patch-2.2.18 linux/drivers/sound/softoss.c

Next file: linux/drivers/sound/sonicvibes.c
Previous file: linux/drivers/sound/pas2_mixer.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/sound/softoss.c linux/drivers/sound/softoss.c
@@ -1113,7 +1113,10 @@
 		return -ENOMEM;
 	}
 	if(copy_from_user(&((char *) patch)[offs], &(addr)[offs], sizeof_patch - offs))
+	{
+		vfree(patch);
 		return -EFAULT;
+	}
 
 	if (patch->mode & WAVE_ROM)
 	{

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