public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] SKB leak in drivers/isdn/i4l/isdn_x25iface.c
@ 2006-06-28 20:06 Eric Sesterhenn
  2006-06-29 19:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-06-28 20:06 UTC (permalink / raw)
  To: eis; +Cc: linux-kernel

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);



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] SKB leak in drivers/isdn/i4l/isdn_x25iface.c
  2006-06-28 20:06 [Patch] SKB leak in drivers/isdn/i4l/isdn_x25iface.c Eric Sesterhenn
@ 2006-06-29 19:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-06-29 19:48 UTC (permalink / raw)
  To: snakebyte; +Cc: eis, linux-kernel

From: Eric Sesterhenn <snakebyte@gmx.de>
Date: Wed, 28 Jun 2006 22:06:07 +0200

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-29 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28 20:06 [Patch] SKB leak in drivers/isdn/i4l/isdn_x25iface.c Eric Sesterhenn
2006-06-29 19:48 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox