]> err.no Git - linux-2.6/commitdiff
[PATCH] airo: Fix an error path memory leak
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 16 Mar 2007 11:42:59 +0000 (12:42 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Mar 2007 19:32:47 +0000 (15:32 -0400)
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>
drivers/net/wireless/airo.c

index a8c2bfe26c2715291253628782cde302f3d63b39..2ada76a93cb620cdbea54dad4f9d03886e212423 100644 (file)
@@ -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: