summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/afb-evt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/afb-evt.c b/src/afb-evt.c
index 2abbc819..88b6d603 100644
--- a/src/afb-evt.c
+++ b/src/afb-evt.c
@@ -234,6 +234,7 @@ static void evt_destroy(struct afb_evt_event *evt)
if (evt != NULL) {
/* unlinks the event if valid! */
pthread_mutex_lock(&events_mutex);
+ found = 0;
prv = &events;
while (*prv && !(found = (*prv == evt)))
prv = &(*prv)->next;