From 4ea1ea5bf486f9e13ed0e62e9a26563cd4dc390f Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 8 Jul 2013 11:58:15 +0100 Subject: [PATCH] Fix memleak spotted by Coverity NB: Fixes Coverity CID1039267 Signed-off-by: Chris Michael --- src/lib/ecore_x/xlib/ecore_x_icccm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_x/xlib/ecore_x_icccm.c b/src/lib/ecore_x/xlib/ecore_x_icccm.c index 8d6ea1f50e..9902065633 100644 --- a/src/lib/ecore_x/xlib/ecore_x_icccm.c +++ b/src/lib/ecore_x/xlib/ecore_x_icccm.c @@ -1035,7 +1035,10 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS, XA_WINDOW, 32, &old_data, &num)) - return; + { + if (old_data) free(old_data); + return; + } oldset = (Window *)old_data; for (i = 0; i < num; i++)