[vlc-commits] Wayland/shell: fix NULL dereference in pathological case

Rémi Denis-Courmont git at videolan.org
Thu Oct 16 19:26:15 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 16 20:21:01 2014 +0300| [202ea6ff56d896952501a2f63c126c1f6ca5bbbc] | committer: Rémi Denis-Courmont

Wayland/shell: fix NULL dereference in pathological case

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=202ea6ff56d896952501a2f63c126c1f6ca5bbbc
---

 modules/video_output/wayland/shell_surface.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/wayland/shell_surface.c b/modules/video_output/wayland/shell_surface.c
index 29fa0ef..efa9a29 100644
--- a/modules/video_output/wayland/shell_surface.c
+++ b/modules/video_output/wayland/shell_surface.c
@@ -300,7 +300,8 @@ static void Close(vout_window_t *wnd)
     wl_shell_surface_destroy(sys->shell_surface);
     wl_surface_destroy(wnd->handle.wl);
     wl_shell_destroy(sys->shell);
-    wl_output_destroy(sys->output);
+    if (sys->output != NULL)
+        wl_output_destroy(sys->output);
     wl_compositor_destroy(sys->compositor);
     wl_display_disconnect(wnd->display.wl);
     free(sys);



More information about the vlc-commits mailing list