]> git.hungrycats.org Git - linux/commitdiff
[IRDA]: Fix memory leak in sa1100_ir.c
authorStephen Hemminger <shemminger@osdl.org>
Thu, 9 Oct 2003 17:04:04 +0000 (10:04 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Thu, 9 Oct 2003 17:04:04 +0000 (10:04 -0700)
drivers/net/irda/sa1100_ir.c

index 7faf66a7eda2bc1fcfd326c8644206a7a46c547b..58e931268c04dcb86ed6de4ea26390ec162b7548 100644 (file)
@@ -1132,12 +1132,8 @@ static void __exit sa1100_irda_exit(void)
        release_mem_region(__PREG(Ser2HSCR0), 0x1c);
        release_mem_region(__PREG(Ser2UTCR0), 0x24);
 
-       /*
-        * We now know that the netdevice is no longer in use, and all
-        * references to our driver have been removed.  The only structure
-        * which may still be present is the netdevice, which will get
-        * cleaned up by net/core/dev.c
-        */
+       if(dev)
+               free_netdev(dev);
 }
 
 static int __init sa1100ir_setup(char *line)