Skip to contentSkip to conversation

path_release missing or not?

PATCH Pete Zaitcev 2 participants 2 messages Nov 12, 2002 VFS

lore
Share & tools
lore
#0 lore raw

Al, please tell me if the patch below is bogus. I checked paths and it looks right, but I may be missing something.

-- Pete

fs/namei.c +3 -1
@@ -1984,8 +1984,10 @@
 	 * bloody create() on broken symlinks. Furrfu...
 	 */
 	name = __getname();
-	if (!name)
+	if (!name) {
+		path_release(nd);
 		return -ENOMEM;
+	}
 	strcpy(name, nd->last.name);
 	nd->last.name = name;
 	return 0;
#1 lore raw
Quoted 2 lines · Pete Zaitcev

Al, please tell me if the patch below is bogus. I checked paths and it looks right, but I may be missing something.

Looks fine.