[PATCH 2/2] hostapd: free nlmsg when radar detection fail

Janusz Dziedzic janusz.dziedzic
Fri Sep 26 11:21:25 PDT 2014


Remove possible memory leak when start radar
detection will fail.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic at tieto.com>
---
 src/drivers/driver_nl80211.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index de37927..dc01cc0 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -11494,6 +11494,7 @@ static int nl80211_start_radar_detection(void *priv,
 	wpa_printf(MSG_DEBUG, "nl80211: Failed to start radar detection: "
 		   "%d (%s)", ret, strerror(-ret));
 nla_put_failure:
+	nlmsg_free(msg);
 	return -1;
 }
 
-- 
1.9.1




More information about the Hostap mailing list