Commit 799cc2cf authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] Fix leak in atmel wireless driver.

Spotted with the source checker from Coverity.com.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1c582040
......@@ -2430,12 +2430,13 @@ static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment