From: Denis Kirjanov <dkirjanov@hera.kernel.org>
To: davem@davemloft.net
Cc: shimoda.yoshihiro@renesas.com, iwamatsu@nigauri.org,
morimoto.kuninori@renesas.com, netdev@vger.kernel.org
Subject: [PATCH] sh_eth: Fix memleak in sh_mdio_release
Date: Thu, 20 May 2010 14:00:59 +0000 [thread overview]
Message-ID: <20100520140059.GA8968@hera.kernel.org> (raw)
Allocated memory for IRQs should be freed when releasing the mii_bus
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
drivers/net/sh_eth.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 586ed09..501a55f 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -1294,6 +1294,9 @@ static int sh_mdio_release(struct net_device *ndev)
/* remove mdio bus info from net_device */
dev_set_drvdata(&ndev->dev, NULL);
+ /* free interrupts memory */
+ kfree(bus->irq);
+
/* free bitbang info */
free_mdio_bitbang(bus);
next reply other threads:[~2010-05-20 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 14:00 Denis Kirjanov [this message]
2010-05-20 22:12 ` [PATCH] sh_eth: Fix memleak in sh_mdio_release Nobuhiro Iwamatsu
2010-05-21 6:14 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100520140059.GA8968@hera.kernel.org \
--to=dkirjanov@hera.kernel.org \
--cc=davem@davemloft.net \
--cc=iwamatsu@nigauri.org \
--cc=morimoto.kuninori@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=shimoda.yoshihiro@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.