patch-2.4.5 linux/net/wanrouter/wanproc.c

Next file: linux/scripts/Menuconfig
Previous file: linux/net/wanrouter/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.4/linux/net/wanrouter/wanproc.c linux/net/wanrouter/wanproc.c
@@ -267,8 +267,10 @@
 		offs = file->f_pos;
 		if (offs < pos) {
 			len = min(pos - offs, count);
-			if(copy_to_user(buf, (page + offs), len))
+			if (copy_to_user(buf, (page + offs), len)) {
+				kfree(page);
 				return -EFAULT;
+			}
 			file->f_pos += len;
 		}
 		else

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)