]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl8021: Avoid potential memory leak on error path
authorPurushottam Kushwaha <p.kushwaha@samsung.com>
Fri, 15 Jan 2016 11:31:03 +0000 (11:31 +0000)
committerJouni Malinen <j@w1.fi>
Fri, 15 Jan 2016 18:27:38 +0000 (20:27 +0200)
The called function nl80211_ht_vht_overrides() was not freeing "msg"
resource in error cases.

Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
src/drivers/driver_nl80211.c

index cdd15043411bbcc201abb154a5c3af90e63de6a1..4cb92d0a4439be43564c1f601a5bd8fc73267787 100644 (file)
@@ -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;