Commit 03753799 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

libvlc: pop_listener does not do its job.

Pointed by Laurent and Valgrind.
parent b8711965
......@@ -133,14 +133,18 @@ static void pop_listener(libvlc_event_manager_t * p_em, libvlc_event_listener_t
while (iter) {
if(listeners_are_equal(&iter->listener, listener))
{
struct queue_elmt * to_delete = iter;
if(!prev)
queue(p_em)->elements = iter->next;
queue(p_em)->elements = to_delete->next;
else
prev->next = iter->next;
free(iter);
prev->next = to_delete->next;
iter = to_delete->next;
free(to_delete);
}
else {
prev = iter;
iter = iter->next;
}
prev = iter;
iter = iter->next;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment