wayland: fdm_del() now closes the FD

This commit is contained in:
Daniel Eklöf 2019-11-01 19:59:39 +01:00
parent 80c4721e57
commit b793919aba
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -556,11 +556,10 @@ wayl_destroy(struct wayland *wayl)
if (wayl == NULL)
return;
if (wayl->kbd.repeat.fd != 0) {
fdm_del(wayl->fdm, wayl->kbd.repeat.fd);
close(wayl->kbd.repeat.fd);
}
fdm_del(wayl->fdm, wayl->kbd.repeat.fd);
tll_foreach(wayl->monitors, it) {
free(it->item.name);
if (it->item.xdg != NULL)
@ -628,7 +627,7 @@ wayl_destroy(struct wayland *wayl)
if (wayl->registry != NULL)
wl_registry_destroy(wayl->registry);
if (wayl->display != NULL) {
fdm_del(wayl->fdm, wl_display_get_fd(wayl->display));
fdm_del_no_close(wayl->fdm, wl_display_get_fd(wayl->display));
wl_display_disconnect(wayl->display);
}