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>
@@ -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;
}