wlt: toolkit: fix use after free of dp_fd
We need to keep dp_fd alive for all calls to wl_display_*(). Otherwise, the callback will use it and access invalid memory. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
e5855f8b61
commit
de2536f4e4
@ -896,9 +896,9 @@ void wlt_display_unref(struct wlt_display *disp)
|
||||
|
||||
unload_cursors(disp);
|
||||
wl_display_remove_global_listener(disp->dp, disp->dp_listener);
|
||||
ev_eloop_rm_fd(disp->dp_fd);
|
||||
wl_display_flush(disp->dp);
|
||||
wl_display_disconnect(disp->dp);
|
||||
ev_eloop_rm_fd(disp->dp_fd);
|
||||
xkb_context_unref(disp->xkb_ctx);
|
||||
shl_hook_free(disp->listeners);
|
||||
ev_eloop_unref(disp->eloop);
|
||||
|
Loading…
x
Reference in New Issue
Block a user