Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/wpa/dist/src/drivers CID 272959: NULL deref



details:   https://anonhg.NetBSD.org/src/rev/826f383d048b
branches:  trunk
changeset: 329540:826f383d048b
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 28 14:36:41 2014 +0000

description:
CID 272959: NULL deref

diffstat:

 external/bsd/wpa/dist/src/drivers/driver_bsd.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (22 lines):

diff -r f8fe0af3ea86 -r 826f383d048b external/bsd/wpa/dist/src/drivers/driver_bsd.c
--- a/external/bsd/wpa/dist/src/drivers/driver_bsd.c    Wed May 28 13:59:38 2014 +0000
+++ b/external/bsd/wpa/dist/src/drivers/driver_bsd.c    Wed May 28 14:36:41 2014 +0000
@@ -853,12 +853,13 @@
 
        return drv;
 bad:
-       if (drv->sock_xmit != NULL)
-               l2_packet_deinit(drv->sock_xmit);
-       if (drv->sock >= 0)
-               close(drv->sock);
-       if (drv != NULL)
+       if (drv != NULL) {
+               if (drv->sock_xmit != NULL)
+                       l2_packet_deinit(drv->sock_xmit);
+               if (drv->sock >= 0)
+                       close(drv->sock);
                os_free(drv);
+       }
        return NULL;
 }
 



Home | Main Index | Thread Index | Old Index