diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2007-03-16 07:42:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-03-16 15:32:47 -0400 |
commit | 4d881901b8c2167884d213eb546ffffc9e5e35ac (patch) | |
tree | e69260491ca767fd622e61b16b37731c61fff689 /drivers | |
parent | 21665a69e6c0c3e383eaef417f0ddbd16bdb69e3 (diff) |
[PATCH] airo: Fix an error path memory leak
The airo driver leaks memory if request_irq() fails.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/airo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a8c2bfe26c27..2ada76a93cb6 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, | |||
2852 | if (rc) { | 2852 | if (rc) { |
2853 | airo_print_err(dev->name, "register interrupt %d failed, rc %d", | 2853 | airo_print_err(dev->name, "register interrupt %d failed, rc %d", |
2854 | irq, rc); | 2854 | irq, rc); |
2855 | goto err_out_unlink; | 2855 | goto err_out_nets; |
2856 | } | 2856 | } |
2857 | if (!is_pcmcia) { | 2857 | if (!is_pcmcia) { |
2858 | if (!request_region( dev->base_addr, 64, dev->name )) { | 2858 | if (!request_region( dev->base_addr, 64, dev->name )) { |
@@ -2935,6 +2935,8 @@ err_out_res: | |||
2935 | release_region( dev->base_addr, 64 ); | 2935 | release_region( dev->base_addr, 64 ); |
2936 | err_out_irq: | 2936 | err_out_irq: |
2937 | free_irq(dev->irq, dev); | 2937 | free_irq(dev->irq, dev); |
2938 | err_out_nets: | ||
2939 | airo_networks_free(ai); | ||
2938 | err_out_unlink: | 2940 | err_out_unlink: |
2939 | del_airo_dev(dev); | 2941 | del_airo_dev(dev); |
2940 | err_out_thr: | 2942 | err_out_thr: |