From: Oleg Drokin <green@linuxhacker.ru>
To: alan@redhat.com, linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: Memleak in ircomm_core
Date: Mon, 10 Mar 2003 00:14:34 +0300 [thread overview]
Message-ID: <20030309211434.GA31791@linuxhacker.ru> (raw)
Hello!
There seems to be a memleak on error exit path. The same patch should apply
to 2.5 and 2.4
Found with help of smatch + enhanced unfree script.
Bye,
Oleg
===== net/irda/ircomm/ircomm_core.c 1.5 vs edited =====
--- 1.5/net/irda/ircomm/ircomm_core.c Tue Aug 6 22:23:24 2002
+++ edited/net/irda/ircomm/ircomm_core.c Mon Mar 10 00:10:10 2003
@@ -121,8 +121,10 @@
} else
ret = ircomm_open_tsap(self);
- if (ret < 0)
+ if (ret < 0) {
+ kfree(self);
return NULL;
+ }
self->service_type = service_type;
self->line = line;
next reply other threads:[~2003-03-09 21:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-09 21:14 Oleg Drokin [this message]
2003-03-09 22:48 ` Memleak in ircomm_core Neale Banks
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=20030309211434.GA31791@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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