Skip to content

Commit d81931d

Browse files
SesterhennEricLinus Torvalds
authored andcommitted
[PATCH] SKB leak in drivers/isdn/i4l/isdn_x25iface.c
Coverity spotted this leak (id raspberrypi#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>
1 parent 9dc3885 commit d81931d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/isdn/i4l/isdn_x25iface.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb
208208
*/
209209
static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
210210
{
211-
struct sk_buff * skb = dev_alloc_skb(1);
211+
struct sk_buff * skb;
212212
enum wan_states *state_p
213213
= &( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state);
214214
IX25DEBUG( "isdn_x25iface_connect_ind %s \n"
@@ -220,6 +220,8 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
220220
return -1;
221221
}
222222
*state_p = WAN_CONNECTED;
223+
224+
skb = dev_alloc_skb(1);
223225
if( skb ){
224226
*( skb_put(skb, 1) ) = 0x01;
225227
skb->protocol = x25_type_trans(skb, cprot->net_dev);

0 commit comments

Comments
 (0)