From: Oleg Drokin <green@linuxhacker.ru>
To: alan@redhat.com, torvalds@transmeta.com,
linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Memleak fix for DIGITAL EtherWORKS 3 ethernet driver
Date: Tue, 22 Apr 2003 23:38:44 +0400 [thread overview]
Message-ID: <20030422193844.GA7418@linuxhacker.ru> (raw)
Hello!
There is a memleak on error exit path that is trivial to fix.
The problem is present both in 2.4 and 2.5, the same patch applies.
Please consider applying.
Bye,
Oleg
===== drivers/net/ewrk3.c 1.20 vs edited =====
--- 1.20/drivers/net/ewrk3.c Tue Dec 3 04:22:09 2002
+++ edited/drivers/net/ewrk3.c Tue Apr 22 23:33:40 2003
@@ -1972,7 +1972,10 @@
case EWRK3_GET_STATS: { /* Get the driver statistics */
struct ewrk3_stats *tmp_stats =
kmalloc(sizeof(lp->pktStats), GFP_KERNEL);
- if (!tmp_stats) return -ENOMEM;
+ if (!tmp_stats) {
+ status = -ENOMEM;
+ break;
+ }
spin_lock_irqsave(&lp->hw_lock, flags);
memcpy(tmp_stats, &lp->pktStats, sizeof(lp->pktStats));
reply other threads:[~2003-04-22 19:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030422193844.GA7418@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox