devilhorns pushed a commit to branch master.
commit 02f545ecc6e3877745f1276aa80175d0090f13d6
Author: Chris Michael <[email protected]>
Date: Mon Jul 8 11:47:13 2013 +0100
Fix memleak. If we error out here, then we should free the data
returned from window_prop_property_get (as that does an allocation).
NB: Fixes Coverity CID1039266
Signed-off-by: Chris Michael <[email protected]>
---
src/lib/ecore_x/xlib/ecore_x_mwm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lib/ecore_x/xlib/ecore_x_mwm.c
b/src/lib/ecore_x/xlib/ecore_x_mwm.c
index 7812cc2..c2d298b 100644
--- a/src/lib/ecore_x/xlib/ecore_x_mwm.c
+++ b/src/lib/ecore_x/xlib/ecore_x_mwm.c
@@ -48,7 +48,10 @@ ecore_x_mwm_hints_get(Ecore_X_Window win,
ECORE_X_ATOM_MOTIF_WM_HINTS,
ECORE_X_ATOM_MOTIF_WM_HINTS,
32, &p, &num))
- return EINA_FALSE;
+ {
+ if (p) free(p);
+ return EINA_FALSE;
+ }
mwmhints = (MWMHints *)p;
if (mwmhints)
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev