ecore_x: remove double free

We first free'd the data in the else, then at the end.

Now we free old_data just before return, and at the end.

Fixes CID 1135637
This commit is contained in:
Sebastian Dransfeld 2013-12-10 08:28:21 +01:00
parent b3d69254b6
commit 4a24b84185
1 changed files with 0 additions and 5 deletions

View File

@ -1036,8 +1036,6 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
if (oldset[i] == subwin)
{
free(old_data);
old_data = NULL;
free(newset);
return;
}
@ -1046,9 +1044,6 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
}
newset[num++] = subwin;
if (old_data)
free(old_data);
data = (unsigned char *)newset;
}