aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPurushottam Kushwaha <p.kushwaha@samsung.com>2016-01-15 11:31:03 (GMT)
committerJouni Malinen <j@w1.fi>2016-01-15 18:27:38 (GMT)
commite15dcf6d1bc2725388555523effca75b1ffab735 (patch)
treeff73290427a363ddcf57ba8075ac4464af031e71
parentc31302c038c879aa6a0575968895038609428c5a (diff)
downloadhostap-e15dcf6d1bc2725388555523effca75b1ffab735.zip
hostap-e15dcf6d1bc2725388555523effca75b1ffab735.tar.gz
hostap-e15dcf6d1bc2725388555523effca75b1ffab735.tar.bz2
nl8021: Avoid potential memory leak on error path
The called function nl80211_ht_vht_overrides() was not freeing "msg" resource in error cases. Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
-rw-r--r--src/drivers/driver_nl80211.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index cdd1504..4cb92d0 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4549,8 +4549,9 @@ retry:
goto fail;
}
- if (nl80211_ht_vht_overrides(msg, params) < 0)
- return -1;
+ ret = nl80211_ht_vht_overrides(msg, params);
+ if (ret < 0)
+ goto fail;
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
msg = NULL;