]> err.no Git - linux-2.6/commitdiff
[PATCH] zd1201: Possible NULL dereference
authorEric Sesterhenn <snakebyte@gmx.de>
Tue, 10 Oct 2006 21:45:45 +0000 (14:45 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 17 Oct 2006 00:09:48 +0000 (20:09 -0400)
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>
drivers/net/wireless/zd1201.c

index 30057a335a7bc6ccb17b6e645f718485fa70453d..36b29ff058141a712619e55184566b39ce414efd 100644 (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: