From: Michal Schmidt Date: Fri, 16 Mar 2007 11:42:59 +0000 (+0100) Subject: [PATCH] airo: Fix an error path memory leak X-Git-Tag: v2.6.21-rc5~21^2~1^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d881901b8c2167884d213eb546ffffc9e5e35ac;p=linux-2.6 [PATCH] airo: Fix an error path memory leak The airo driver leaks memory if request_irq() fails. Signed-off-by: Michal Schmidt Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a8c2bfe26c..2ada76a93c 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -2852,7 +2852,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, if (rc) { airo_print_err(dev->name, "register interrupt %d failed, rc %d", irq, rc); - goto err_out_unlink; + goto err_out_nets; } if (!is_pcmcia) { if (!request_region( dev->base_addr, 64, dev->name )) { @@ -2935,6 +2935,8 @@ err_out_res: release_region( dev->base_addr, 64 ); err_out_irq: free_irq(dev->irq, dev); +err_out_nets: + airo_networks_free(ai); err_out_unlink: del_airo_dev(dev); err_out_thr: