[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1279020192-9484-1-git-send-email-segooon@gmail.com>
Date: Tue, 13 Jul 2010 15:23:12 +0400
From: Kulikov Vasiliy <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Joe Perches <joe@...ches.com>, netdev@...r.kernel.org
Subject: [PATCH] wd: fix memory leak
Unmap mapped IO in wd_probe1() if register_netdev() failed.
Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
---
drivers/net/wd.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wd.c b/drivers/net/wd.c
index 746a5ee..eb72c67 100644
--- a/drivers/net/wd.c
+++ b/drivers/net/wd.c
@@ -358,8 +358,10 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
#endif
err = register_netdev(dev);
- if (err)
+ if (err) {
free_irq(dev->irq, dev);
+ iounmap(ei_status.mem);
+ }
return err;
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists