From: Eric Sesterhenn Date: Tue, 10 Oct 2006 21:45:45 +0000 (-0700) Subject: [PATCH] zd1201: Possible NULL dereference X-Git-Tag: v2.6.19-rc3~13^2~1^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=683f8c9e00d2aa911382186ca891bd221efaea74;p=linux-2.6-omap-h63xx.git [PATCH] zd1201: Possible NULL dereference If we enter the if(!zd) and set free to 1, we dereference zd in the exit code. Signed-off-by: Eric Sesterhenn Signed-off-by: Andrew Morton Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 30057a335a7..36b29ff0581 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c @@ -193,10 +193,8 @@ static void zd1201_usbrx(struct urb *urb) struct sk_buff *skb; unsigned char type; - if (!zd) { - free = 1; - goto exit; - } + if (!zd) + return; switch(urb->status) { case -EILSEQ: