diff options
author | dudemanguy <random342@airmail.cc> | 2019-10-03 08:19:12 -0500 |
---|---|---|
committer | Dudemanguy911 <random342@airmail.cc> | 2019-10-03 14:56:43 +0000 |
commit | 9d6ae83fdc254cf92d2f02bcd33ff66e5a900a1c (patch) | |
tree | 0ab7411021e0e1d186c1ae17d23427adb4bfb04d | |
parent | defc8f359c5e4bb666e8ad1d4a097a8ac66cc1e2 (diff) | |
download | mpv-9d6ae83fdc254cf92d2f02bcd33ff66e5a900a1c.tar.bz2 mpv-9d6ae83fdc254cf92d2f02bcd33ff66e5a900a1c.tar.xz |
Revert "wayland: free wayland_state on a false return"
Dumb idea. The correct thing to do is to fix the preinit and context
creation so that the uninit is correctly executed when probing fails
(and then everything gets freed).
This reverts commit defc8f359c5e4bb666e8ad1d4a097a8ac66cc1e2.
-rw-r--r-- | video/out/wayland_common.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index d015bb4882..a70377f3c6 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1043,15 +1043,11 @@ int vo_wayland_init(struct vo *vo) wl_list_init(&wl->output_list); - if (!wl->display) { - talloc_free(wl); + if (!wl->display) return false; - } - if (create_input(wl)) { - talloc_free(wl); + if (create_input(wl)) return false; - } wl->registry = wl_display_get_registry(wl->display); wl_registry_add_listener(wl->registry, ®istry_listener, wl); @@ -1062,22 +1058,18 @@ int vo_wayland_init(struct vo *vo) if (!wl->wm_base) { MP_FATAL(wl, "Compositor doesn't support the required %s protocol!\n", xdg_wm_base_interface.name); - talloc_free(wl); return false; } if (!wl_list_length(&wl->output_list)) { MP_FATAL(wl, "No outputs found or compositor doesn't support %s (ver. 2)\n", wl_output_interface.name); - talloc_free(wl); return false; } /* Can't be initialized during registry due to multi-protocol dependence */ - if (create_xdg_surface(wl)) { - talloc_free(wl); + if (create_xdg_surface(wl)) return false; - } if (wl->dnd_devman) { wl->dnd_ddev = wl_data_device_manager_get_data_device(wl->dnd_devman, wl->seat); |