]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: fix memory leak inside parse_sched_scan
authorJohn Crispin <john@phrozen.org>
Fri, 17 May 2019 19:29:54 +0000 (21:29 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 May 2019 08:44:25 +0000 (10:44 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
scan.c

diff --git a/scan.c b/scan.c
index b0b7828c3c793d2bbdf0440ac13b2ccc998aa77a..980bfb41044e9bc26178aac1bc9a6be9abb7d8d7 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -355,11 +355,12 @@ int parse_sched_scan(struct nl_msg *msg, int *argc, char ***argv)
 nla_put_failure:
        if (match)
                nla_nest_end(msg, match);
+out:
        nlmsg_free(freqs);
        nlmsg_free(matchset);
        nlmsg_free(scan_plans);
+       nlmsg_free(ssids);
 
-out:
        *argc = c;
        *argv = v;
        return err;