]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
bsd: Remove redundant NULL check in bsd_init()
authorJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 15:20:24 +0000 (18:20 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 15:20:24 +0000 (18:20 +0300)
drv cannot be NULL here (it is dereferenced even on the preceding line)
and anyway, os_free(NULL) is allowed, so remove the redundant check.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_bsd.c

index 0f1a0f60f27d69766c9d3b166cf8e8526fdd2997..9ac87b4a324483c81d07df9f497028e80f64306d 100644 (file)
@@ -861,8 +861,7 @@ bad:
        if (drv->sock >= 0)
                close(drv->sock);
        os_free(drv->event_buf);
-       if (drv != NULL)
-               os_free(drv);
+       os_free(drv);
        return NULL;
 }