aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-06-23 15:20:24 (GMT)
committerJouni Malinen <j@w1.fi>2015-06-23 15:20:24 (GMT)
commit6ce1bea1ffc4c875c876d770df35d61c1911d981 (patch)
treed2c3c181f9a1985c34486a27db606d158897a3b1 /src/drivers/driver_bsd.c
parentc99df20192d8c3f164bdb8531d04cbfe3b482b21 (diff)
downloadhostap-6ce1bea1ffc4c875c876d770df35d61c1911d981.zip
hostap-6ce1bea1ffc4c875c876d770df35d61c1911d981.tar.gz
hostap-6ce1bea1ffc4c875c876d770df35d61c1911d981.tar.bz2
bsd: Remove redundant NULL check in bsd_init()
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>
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 0f1a0f6..9ac87b4 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -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;
}