All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix leak in atmel wireless driver.
@ 2004-09-01 15:51 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2004-09-01 15:51 UTC (permalink / raw)
  To: linux-kernel

Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/net/wireless/atmel.c linux-2.6/drivers/net/wireless/atmel.c
--- bk-linus/drivers/net/wireless/atmel.c	2004-08-11 00:00:37.000000000 +0100
+++ linux-2.6/drivers/net/wireless/atmel.c	2004-08-23 14:08:15.000000000 +0100
@@ -2430,12 +2430,13 @@ static int atmel_ioctl(struct net_device
 			rc = -ENOMEM;
 			break;
 		}
-		
+
 		if (copy_from_user(new_firmware, com.data, com.len)) {
+			kfree(new_firmware);
 			rc = -EFAULT;
 			break;
 		}
-		
+
 		if (priv->firmware)
 			kfree(priv->firmware);
 		

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-01 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-01 15:51 [PATCH] Fix leak in atmel wireless driver Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.