From 11ef74c9620796c21e0979c12a2da49b3ebde82c Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 8 Nov 2016 12:12:26 -0500 Subject: [PATCH] ecore-evas-wayland: Fix case of potential double-free This patch addresses the case where we failed to allocate 'wdata' and were calling free(ee) before going to an error handler. For the fix, just don't free(ee) here and let the error handling do it's job. Signed-off-by: Chris Michael --- .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index ce2a7ae9fb..63fab2f50d 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -2048,7 +2048,6 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i if (!(wdata = calloc(1, sizeof(Ecore_Evas_Engine_Wl_Data)))) { ERR("Failed to allocate Ecore_Evas_Engine_Wl_Data"); - free(ee); goto w_err; }