aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1201.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-10-10 17:45:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-10-16 20:09:48 -0400
commit683f8c9e00d2aa911382186ca891bd221efaea74 (patch)
treefd93a36b300ed8ce9025b09624333c839375c932 /drivers/net/wireless/zd1201.c
parent7e4e8d99c2288a490a0806b9cb40016913312cfe (diff)
[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>
Diffstat (limited to 'drivers/net/wireless/zd1201.c')
-rw-r--r--drivers/net/wireless/zd1201.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 30057a335a7b..36b29ff05814 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -193,10 +193,8 @@ static void zd1201_usbrx(struct urb *urb)
193 struct sk_buff *skb; 193 struct sk_buff *skb;
194 unsigned char type; 194 unsigned char type;
195 195
196 if (!zd) { 196 if (!zd)
197 free = 1; 197 return;
198 goto exit;
199 }
200 198
201 switch(urb->status) { 199 switch(urb->status) {
202 case -EILSEQ: 200 case -EILSEQ: