tpl_wayland_egl: Add missing error-checking to __tpl_wayland_egl_display_buffer_flush... 82/101182/1
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Wed, 30 Nov 2016 10:52:56 +0000 (19:52 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Wed, 30 Nov 2016 10:52:56 +0000 (19:52 +0900)
When the wl_display_get_registry() fails on  __tpl_wayland_egl_display_buffer_flusher_init(),
this patch makes to return and deinitialize allocated resource.

Change-Id: I773089d55f7555d269e183f3c129e2171c0243eb
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
src/tpl_wayland_egl.c

index 2569a00..d6c5cac 100644 (file)
@@ -1255,7 +1255,7 @@ __tpl_wayland_egl_display_buffer_flusher_init(
        }
 
        registry = wl_display_get_registry(wayland_egl_display->wl_dpy);
-       if (!queue) {
+       if (!registry) {
                TPL_ERR("Failed to create wl_registry");
                goto fini;
        }