forked from enlightenment/efl
Fix memleak reported by Coverity: If we are going to error out when
getting window netwm types, then free any atoms returned by prop_atom_list_get. NB: Fixes Coverity CID1039265 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
e28f298dbd
commit
e6088e2361
|
@ -1237,7 +1237,10 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win,
|
|||
|
||||
atoms2 = malloc(num * sizeof(Ecore_X_Window_Type));
|
||||
if (!atoms2)
|
||||
return 0;
|
||||
{
|
||||
if (atoms) free(atoms);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
atoms2[i] = _ecore_x_netwm_window_type_type_get(atoms[i]);
|
||||
|
|
Loading…
Reference in New Issue