summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wpa_ctrl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wpa_ctrl.c b/src/wpa_ctrl.c
index fa3a643..34b626a 100644
--- a/src/wpa_ctrl.c
+++ b/src/wpa_ctrl.c
@@ -561,6 +561,8 @@ int wfd_wpa_ctrl_dispatch(struct wfd_wpa_ctrl *wpa, int timeout)
n = max;
}
+ wfd_wpa_ctrl_ref(wpa);
+
r = 0;
for (i = 0; i < n; ++i) {
e = &ev[i];
@@ -575,6 +577,8 @@ int wfd_wpa_ctrl_dispatch(struct wfd_wpa_ctrl *wpa, int timeout)
break;
}
+ wfd_wpa_ctrl_unref(wpa);
+
return r;
}