Skip to content

Commit

Permalink
[PATCH] zd1201: Possible NULL dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and John W. Linville committed Oct 17, 2006
1 parent 7e4e8d9 commit 683f8c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/zd1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 683f8c9

Please sign in to comment.