devilhorns pushed a commit to branch master.
commit 4ea1ea5bf486f9e13ed0e62e9a26563cd4dc390f
Author: Chris Michael <[email protected]>
Date: Mon Jul 8 11:58:15 2013 +0100
Fix memleak spotted by Coverity
NB: Fixes Coverity CID1039267
Signed-off-by: Chris Michael <[email protected]>
---
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 8d6ea1f..9902065 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++)
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev