From 1f767a78b7a2bbfa855b8345618f996f47b8d574 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Fri, 30 Dec 2016 16:16:47 +0900 Subject: [PATCH] e_comp_wl: fix deref null issue Change-Id: I43990d29d0769828b2bfc6684121471b55d79628 --- src/bin/e_comp_wl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 2b8f26bddd..f8deb7f2bf 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3777,7 +3777,13 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ * because server will send the fatal error when a client destroy a subsurface object. * Otherwise, server will kill a client by the fatal error. */ - res = wl_resource_create(client, &wl_subsurface_interface, 1, id); + if (!(res = wl_resource_create(client, &wl_subsurface_interface, 1, id))) + { + ERR("Failed to create subsurface resource"); + wl_resource_post_no_memory(surface_resource); + return EINA_FALSE; + } + wl_resource_set_implementation(res, &_e_subsurface_interface, NULL, NULL); ERR("tizen_policy failed: invalid parent"); -- 2.34.1