[PATCH] driver_bsd.c: Use os_free() instead of free()

Masashi Honma honma
Sun Jan 17 16:59:47 PST 2010


Hello.

This patch replaces some free() with os_free(). Because the
freeing poiter was allocated by os_*().


diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 9744570..84be779 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -795,7 +795,7 @@ bad:
 	if (drv->ioctl_sock >= 0)
 		close(drv->ioctl_sock);
 	if (drv != NULL)
-		free(drv);
+		os_free(drv);
 	return NULL;
 }
 
@@ -811,7 +811,7 @@ bsd_deinit(void *priv)
 		close(drv->ioctl_sock);
 	if (drv->sock_xmit != NULL)
 		l2_packet_deinit(drv->sock_xmit);
-	free(drv);
+	os_free(drv);
 }
 
 const struct wpa_driver_ops wpa_driver_bsd_ops = {


Regards,
Masashi Honma.



More information about the Hostap mailing list