mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-19 10:33:05 -05:00
Fix a couple memory leaks
Found using valgrind. Signed-hostap: Paul Stewart <pstew@chromium.org>
This commit is contained in:
parent
02af9c90fb
commit
21270bb4b3
@ -8465,12 +8465,15 @@ static int nl80211_signal_monitor(void *priv, int threshold, int hysteresis)
|
|||||||
|
|
||||||
cqm = nlmsg_alloc();
|
cqm = nlmsg_alloc();
|
||||||
if (cqm == NULL)
|
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_THOLD, threshold);
|
||||||
NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hysteresis);
|
NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hysteresis);
|
||||||
nla_put_nested(msg, NL80211_ATTR_CQM, cqm);
|
nla_put_nested(msg, NL80211_ATTR_CQM, cqm);
|
||||||
|
|
||||||
|
nlmsg_free(cqm);
|
||||||
|
cqm = NULL;
|
||||||
|
|
||||||
if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0)
|
if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
msg = NULL;
|
msg = NULL;
|
||||||
|
@ -609,6 +609,7 @@ DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
|
|||||||
out:
|
out:
|
||||||
os_free(driver);
|
os_free(driver);
|
||||||
os_free(ifname);
|
os_free(ifname);
|
||||||
|
os_free(confname);
|
||||||
os_free(bridge_ifname);
|
os_free(bridge_ifname);
|
||||||
return reply;
|
return reply;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user