Skip to content

Commit

Permalink
[PATCH] SKB leak in drivers/isdn/i4l/isdn_x25iface.c
Browse files Browse the repository at this point in the history
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>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric Sesterhenn authored and Linus Torvalds committed Jun 29, 2006
1 parent 9dc3885 commit d81931d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/isdn/i4l/isdn_x25iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb
*/
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"
Expand All @@ -220,6 +220,8 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
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);
Expand Down

0 comments on commit d81931d

Please sign in to comment.