[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>
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 30057a3..36b29ff 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -193,10 +193,8 @@
struct sk_buff *skb;
unsigned char type;
- if (!zd) {
- free = 1;
- goto exit;
- }
+ if (!zd)
+ return;
switch(urb->status) {
case -EILSEQ: