projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
138a5cd
)
tokenring/3c359.c: Prevent possible mem leak when open failed
author
Jirka Pirko
<jirka@pirko.cz>
Mon, 24 Nov 2008 22:49:11 +0000
(14:49 -0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 24 Nov 2008 22:49:11 +0000
(14:49 -0800)
Freeing previously allocated buffers in case of error.
Signed-off-by: Jirka Pirko <jirka@pirko.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tokenring/3c359.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/tokenring/3c359.c
b/drivers/net/tokenring/3c359.c
index 8a43ecd0d6e7596c08d2723c33348dac850aad01..e7a944657cf8bc966c76d9a0dcb46bac0a9ea3d8 100644
(file)
--- a/
drivers/net/tokenring/3c359.c
+++ b/
drivers/net/tokenring/3c359.c
@@
-669,6
+669,8
@@
static int xl_open(struct net_device *dev)
if (i==0) {
printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled \n",dev->name) ;
free_irq(dev->irq,dev) ;
+ kfree(xl_priv->xl_tx_ring);
+ kfree(xl_priv->xl_rx_ring);
return -EIO ;
}