Browse Source

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>
Jouni Malinen 9 years ago
parent
commit
6ce1bea1ff
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/drivers/driver_bsd.c

+ 1 - 2
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;
 }