patch-2.1.51 linux/fs/nfs/symlink.c

Next file: linux/fs/nfsd/export.c
Previous file: linux/fs/nfs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.50/linux/fs/nfs/symlink.c linux/fs/nfs/symlink.c
@@ -61,8 +61,8 @@
 		copy_to_user(buffer, res, len);
 		put_user('\0', buffer + len);
 		error = len;
+		kfree(mem);
 	}
-	kfree(mem);
 	return error;
 }
 
@@ -81,7 +81,6 @@
 
 	if (error) {
 		dput(base);
-		kfree(mem);
 		return ERR_PTR(error);
 	}
 	path = kmalloc(len + 1, GFP_KERNEL);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov