1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

dbus: prevent double free timeout event

SUL callback triggers a dbus timeout handle, handle removes the linked
list entry and free's the memory attached to the entry. Remove the code
where the the entry was removed by the timer callback, which triggered
a double free of the same linked list entry.
This commit is contained in:
Max van Kessel 2023-04-17 15:15:53 +02:00 committed by Andy Green
parent 5371621d48
commit 3b5b0078c5

View file

@ -293,8 +293,6 @@ lws_dbus_sul_cb(lws_sorted_usec_list_t *sul)
if (time(NULL) > r->fire) {
lwsl_notice("%s: firing timer\n", __func__);
dbus_timeout_handle(r->data);
lws_dll2_remove(rdt);
lws_free(rdt);
}
} lws_end_foreach_dll_safe(rdt, nx);