[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 <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Eric Sesterhenn 2006-10-10 14:45:45 -07:00 committed by John W. Linville
parent 7e4e8d99c2
commit 683f8c9e00
1 changed files with 2 additions and 4 deletions

View File

@ -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: