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>
This commit is contained in:
Chris Michael 2013-07-08 11:47:13 +01:00
parent e6088e2361
commit 02f545ecc6
1 changed files with 4 additions and 1 deletions

View File

@ -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)