forked from luck/tmp_suning_uos_patched
tokenring/3c359.c: Prevent possible mem leak when open failed
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>
This commit is contained in:
parent
138a5cdf2f
commit
5c94afd79c
@ -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 ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user