From d81931d9a2ec3e2e2cd8238b72f20c5fe44ccc7b Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Thu, 29 Jun 2006 02:24:34 -0700 Subject: [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 Acked-by: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/isdn/i4l/isdn_x25iface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') 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 */ 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(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); -- cgit v1.2.3-58-ga151