devilhorns pushed a commit to branch master.
commit d7600cfbee39833bfff52784684300c3f760c202
Author: Chris Michael <[email protected]>
Date: Mon Jul 8 12:34:28 2013 +0100
Fix memleak of window_prop_property_get
NB: Fixes Coverity CID1039274
Signed-off-by: Chris Michael <[email protected]>
---
src/lib/ecore_x/xlib/ecore_x_dnd.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/lib/ecore_x/xlib/ecore_x_dnd.c
b/src/lib/ecore_x/xlib/ecore_x_dnd.c
index d44dc4f..f120017 100644
--- a/src/lib/ecore_x/xlib/ecore_x_dnd.c
+++ b/src/lib/ecore_x/xlib/ecore_x_dnd.c
@@ -201,12 +201,19 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
t = realloc(_version_cache, _version_cache_alloc *
sizeof(Version_Cache_Item));
- if (!t) return 0;
+ if (!t)
+ {
+ if (prop_data) free(prop_data);
+ return 0;
+ }
+
_version_cache = t;
_version_cache[_version_cache_num - 1].win = win;
_version_cache[_version_cache_num - 1].ver = 0;
}
+ if (prop_data) free(prop_data);
+
return 0;
}
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev