From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <greg@kroah.com>,
Stuart MacDonald <stuartm@connecttech.com>,
linux-usb-devel@lists.sourceforge.net,
Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH] Resource leak fix for whiteheat driver
Date: Sun, 23 Apr 2006 19:59:23 +0200 [thread overview]
Message-ID: <200604231959.23877.jesper.juhl@gmail.com> (raw)
We may return from drivers/usb/serial/whiteheat.c::whiteheat_attach()
without freeing `result' if we leave via the no_firmware: label.
Spotted by the coverity checker as #670
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
drivers/usb/serial/whiteheat.c | 1 +
1 files changed, 1 insertion(+)
--- linux-2.6.17-rc2-git4-orig/drivers/usb/serial/whiteheat.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.17-rc2-git4/drivers/usb/serial/whiteheat.c 2006-04-23 19:52:27.000000000 +0200
@@ -508,6 +508,7 @@ no_firmware:
err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description);
err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description);
err("%s: please contact support@connecttech.com\n", serial->type->description);
+ kfree(result);
return -ENODEV;
no_command_private:
reply other threads:[~2006-04-23 17:58 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=200604231959.23877.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=stuartm@connecttech.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