forked from enlightenment/efl
Fix memleak of window_prop_property_get
NB: Fixes Coverity CID1039273 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
e33391ef56
commit
a01ce5e409
|
@ -1243,7 +1243,10 @@ ecore_x_e_window_profile_get(Ecore_X_Window win)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_E_WINDOW_PROFILE,
|
||||
XA_ATOM, 32, &data, &num))
|
||||
{
|
||||
if (data) free(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (data)
|
||||
atom = (Ecore_X_Atom *)data;
|
||||
|
@ -1251,6 +1254,8 @@ ecore_x_e_window_profile_get(Ecore_X_Window win)
|
|||
if (atom)
|
||||
profile = ecore_x_atom_name_get(atom[0]);
|
||||
|
||||
if (data) free(data);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue