From b78a01bfb5b5676b611ea06048691373d1046950 Mon Sep 17 00:00:00 2001 From: twy_2000 Date: Sun, 10 May 2020 15:46:43 +0800 Subject: [PATCH] dawn_iwinfo: release iwinfo after usage --- src/utils/dawn_iwinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/dawn_iwinfo.c b/src/utils/dawn_iwinfo.c index 9add02c..7ed1f40 100644 --- a/src/utils/dawn_iwinfo.c +++ b/src/utils/dawn_iwinfo.c @@ -224,9 +224,11 @@ int get_expected_throughput(const char *ifname, uint8_t *client_addr) { if (iw->assoclist(ifname, buf, &len)) { fprintf(stdout, "No information available\n"); + iwinfo_finish(); return INT_MIN; } else if (len <= 0) { fprintf(stdout, "No station connected\n"); + iwinfo_finish(); return INT_MIN; } @@ -353,4 +355,4 @@ int support_vht(const char *ifname) { int ret = htmodes & vht_support_bitmask ? 1 : 0; iwinfo_finish(); return ret; -} \ No newline at end of file +}