[vlc-commits] wayland: release shm and viewporter on error

Alexandre Janniaux git at videolan.org
Sun Feb 24 10:43:41 CET 2019


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Tue Feb  5 14:51:10 2019 +0100| [3a1509186af5473ee5fde20c4cd44d9c19881387] | committer: Jean-Baptiste Kempf

wayland: release shm and viewporter on error

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/wayland/shm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
index fd5be34605..5d772269be 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -358,6 +358,12 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     return VLC_SUCCESS;
 
 error:
+    if (sys->viewporter != NULL)
+        wp_viewporter_destroy(sys->viewporter);
+
+    if (sys->shm != NULL)
+        wl_shm_destroy(sys->shm);
+
     if (sys->eventq != NULL)
         wl_event_queue_destroy(sys->eventq);
     free(sys);



More information about the vlc-commits mailing list