forked from enlightenment/efl
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:
parent
b3d69254b6
commit
4a24b84185
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue