aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Stewart <pstew@chromium.org>2012-08-04 20:10:08 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-08 23:48:03 +0300
commitf2f1caae16829f02fd000188bd696d5247f97442 (patch)
tree9dcd1d833941b0f563a2ca2f78d3163cef1bd358 /src
parentbac82c9a17973f97597dddef9f3840b350ca491c (diff)
downloadexternal_wpa_supplicant_8_ti-f2f1caae16829f02fd000188bd696d5247f97442.zip
external_wpa_supplicant_8_ti-f2f1caae16829f02fd000188bd696d5247f97442.tar.gz
external_wpa_supplicant_8_ti-f2f1caae16829f02fd000188bd696d5247f97442.tar.bz2
Fix a couple memory leaks
Found using valgrind. Signed-hostap: Paul Stewart <pstew@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver_nl80211.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index a0145db..f7b56b2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8602,12 +8602,15 @@ static int nl80211_signal_monitor(void *priv, int threshold, int hysteresis)
cqm = nlmsg_alloc();
if (cqm == NULL)
- return -1;
+ goto nla_put_failure;
NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_THOLD, threshold);
NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hysteresis);
nla_put_nested(msg, NL80211_ATTR_CQM, cqm);
+ nlmsg_free(cqm);
+ cqm = NULL;
+
if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0)
return 0;
msg = NULL;