aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_x/xlib/ecore_x_mwm.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-07-08 11:47:13 +0100
committerChris Michael <cp.michael@samsung.com>2013-07-08 11:47:13 +0100
commit02f545ecc6e3877745f1276aa80175d0090f13d6 (patch)
tree8bec070ef76f9107bb7fe40ccbe9cd39403f7234 /src/lib/ecore_x/xlib/ecore_x_mwm.c
parentFix memleak reported by Coverity: If we are going to error out when (diff)
downloadefl-02f545ecc6e3877745f1276aa80175d0090f13d6.tar.gz
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 <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_x/xlib/ecore_x_mwm.c')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_mwm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_mwm.c b/src/lib/ecore_x/xlib/ecore_x_mwm.c
index 7812cc23ae..c2d298bc81 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)