Messages in this thread Patch in this message | | | Date | Wed, 1 Sep 2004 16:51:20 +0100 | From | Dave Jones <> | Subject | [PATCH] Fix leak in atmel wireless driver. |
| |
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); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |