From: Eric Sesterhenn <snakebyte@gmx.de>
To: eis@baty.hanse.de
Cc: linux-kernel@vger.kernel.org
Subject: [Patch] SKB leak in drivers/isdn/i4l/isdn_x25iface.c
Date: Wed, 28 Jun 2006 22:06:07 +0200 [thread overview]
Message-ID: <1151525167.26804.2.camel@alice> (raw)
hi,
coverity spotted this leak (id #613), when
we are not configured, we return without
freeing the allocated skb.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.17-git11/drivers/isdn/i4l/isdn_x25iface.c.orig 2006-06-28 22:02:38.000000000 +0200
+++ linux-2.6.17-git11/drivers/isdn/i4l/isdn_x25iface.c 2006-06-28 22:03:02.000000000 +0200
@@ -208,7 +208,7 @@ static int isdn_x25iface_receive(struct
*/
static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
{
- struct sk_buff * skb = dev_alloc_skb(1);
+ struct sk_buff * skb;
enum wan_states *state_p
= &( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state);
IX25DEBUG( "isdn_x25iface_connect_ind %s \n"
@@ -220,6 +220,8 @@ static int isdn_x25iface_connect_ind(str
return -1;
}
*state_p = WAN_CONNECTED;
+
+ skb = dev_alloc_skb(1);
if( skb ){
*( skb_put(skb, 1) ) = 0x01;
skb->protocol = x25_type_trans(skb, cprot->net_dev);
next reply other threads:[~2006-06-28 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-28 20:06 Eric Sesterhenn [this message]
2006-06-29 19:48 ` [Patch] SKB leak in drivers/isdn/i4l/isdn_x25iface.c 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=1151525167.26804.2.camel@alice \
--to=snakebyte@gmx.de \
--cc=eis@baty.hanse.de \
--cc=linux-kernel@vger.kernel.org \
/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.