aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-10-04 08:58:24 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-04 15:52:38 (GMT)
commit12ea4cff6b6335942b49509767c78b25255b640f (patch)
tree6dcd50e77cfafcbd074b8d44a6418e1a39c16f0a /wpa_supplicant/ctrl_iface_unix.c
parentd9052150eb80f88c9e0b3ea0c0de1e86820e0a62 (diff)
downloadhostap-12ea4cff6b6335942b49509767c78b25255b640f.zip
hostap-12ea4cff6b6335942b49509767c78b25255b640f.tar.gz
hostap-12ea4cff6b6335942b49509767c78b25255b640f.tar.bz2
Add forgotten list entry removal for control interface deinit
dl_list_del() must be called before freeing the list entries. Neither of these cases caused problems because the full list data structure was freed, but still, it is better to do this properly. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 33457f2..2c71b2d 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -916,8 +916,10 @@ void wpa_supplicant_ctrl_iface_deinit(struct ctrl_iface_priv *priv)
free_dst:
dl_list_for_each_safe(dst, prev, &priv->ctrl_dst, struct wpa_ctrl_dst,
- list)
+ list) {
+ dl_list_del(&dst->list);
os_free(dst);
+ }
dl_list_for_each_safe(msg, prev_msg, &priv->msg_queue,
struct ctrl_iface_msg, list) {
dl_list_del(&msg->list);
@@ -1422,8 +1424,10 @@ wpa_supplicant_global_ctrl_iface_deinit(struct ctrl_iface_global_priv *priv)
if (priv->global->params.ctrl_interface)
unlink(priv->global->params.ctrl_interface);
dl_list_for_each_safe(dst, prev, &priv->ctrl_dst, struct wpa_ctrl_dst,
- list)
+ list) {
+ dl_list_del(&dst->list);
os_free(dst);
+ }
dl_list_for_each_safe(msg, prev_msg, &priv->msg_queue,
struct ctrl_iface_msg, list) {
dl_list_del(&msg->list);