[PATCH 4/5] wlantest: delete each entry from the wep list before freeing the entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To be consistent with how all the other dl lists like passphrase, pmk, ptk
lists are freed, delete each entry from the wep list before freeing the
entry.

Signed-off-by: Gokul Sivakumar <gokulkumar792@xxxxxxxxx>
---
 wlantest/wlantest.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/wlantest/wlantest.c b/wlantest/wlantest.c
index ae4eff73c..b24648805 100644
--- a/wlantest/wlantest.c
+++ b/wlantest/wlantest.c
@@ -77,6 +77,13 @@ static void ptk_deinit(struct wlantest_ptk *ptk)
 }
 
 
+static void wep_deinit(struct wlantest_wep *wep)
+{
+	dl_list_del(&wep->list);
+	os_free(wep);
+}
+
+
 static void wlantest_deinit(struct wlantest *wt)
 {
 	struct wlantest_passphrase *p, *pn;
@@ -104,7 +111,7 @@ static void wlantest_deinit(struct wlantest *wt)
 	dl_list_for_each_safe(ptk, npt, &wt->ptk, struct wlantest_ptk, list)
 		ptk_deinit(ptk);
 	dl_list_for_each_safe(wep, nw, &wt->wep, struct wlantest_wep, list)
-		os_free(wep);
+		wep_deinit(wep);
 	write_pcap_deinit(wt);
 	write_pcapng_deinit(wt);
 	clear_notes(wt);
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux