Fix memleak spotted by Coverity

NB: Fixes Coverity CID1039267

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 11:58:15 +01:00
parent 02f545ecc6
commit 4ea1ea5bf4
1 changed files with 4 additions and 1 deletions

View File

@ -1035,7 +1035,10 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
if (!ecore_x_window_prop_property_get(win,
ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
XA_WINDOW, 32, &old_data, &num))
return;
{
if (old_data) free(old_data);
return;
}
oldset = (Window *)old_data;
for (i = 0; i < num; i++)