[listener] Fix #205 where listener_remove could break the linked list and orphan some cb's

This commit is contained in:
ejurgensen 2015-12-16 23:16:58 +01:00
parent 6e58af75cf
commit e8ea00896d

View File

@ -73,7 +73,7 @@ listener_remove(notify notify_cb)
if (prev)
prev->next = listener->next;
else
listener_list = NULL;
listener_list = listener->next;
free(listener);
return 0;