diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-29 05:24:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:21 -0400 |
commit | d81931d9a2ec3e2e2cd8238b72f20c5fe44ccc7b (patch) | |
tree | 33a67614c605f2c3635619f977932a3e14a728a7 | |
parent | 9dc3885dfbebc76f4461b19e1af15e704ff4fcb0 (diff) |
[PATCH] SKB leak in drivers/isdn/i4l/isdn_x25iface.c
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>
-rw-r--r-- | drivers/isdn/i4l/isdn_x25iface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c index 743ac4077f35..8b3efc243161 100644 --- a/drivers/isdn/i4l/isdn_x25iface.c +++ b/drivers/isdn/i4l/isdn_x25iface.c | |||
@@ -208,7 +208,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb | |||
208 | */ | 208 | */ |
209 | static int isdn_x25iface_connect_ind(struct concap_proto *cprot) | 209 | static int isdn_x25iface_connect_ind(struct concap_proto *cprot) |
210 | { | 210 | { |
211 | struct sk_buff * skb = dev_alloc_skb(1); | 211 | struct sk_buff * skb; |
212 | enum wan_states *state_p | 212 | enum wan_states *state_p |
213 | = &( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state); | 213 | = &( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state); |
214 | IX25DEBUG( "isdn_x25iface_connect_ind %s \n" | 214 | IX25DEBUG( "isdn_x25iface_connect_ind %s \n" |
@@ -220,6 +220,8 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot) | |||
220 | return -1; | 220 | return -1; |
221 | } | 221 | } |
222 | *state_p = WAN_CONNECTED; | 222 | *state_p = WAN_CONNECTED; |
223 | |||
224 | skb = dev_alloc_skb(1); | ||
223 | if( skb ){ | 225 | if( skb ){ |
224 | *( skb_put(skb, 1) ) = 0x01; | 226 | *( skb_put(skb, 1) ) = 0x01; |
225 | skb->protocol = x25_type_trans(skb, cprot->net_dev); | 227 | skb->protocol = x25_type_trans(skb, cprot->net_dev); |