forked from enlightenment/efl
Fix memleak spotted by Coverity: ecore_x_window_prop_property_get can
allocate space for 'data'. If we return before using it, then free 'data'. If we use it later for XGetAtomName, then we can free if After we have gotten the atom names and sent the event. (NB: XGetAtomName will allocate it's own space for the returned name, so this is safe). NB: Fixes Coverity CID1039271 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
5969c97f7a
commit
0d12ab48be
|
@ -1556,6 +1556,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
{
|
||||
WRN(
|
||||
"DND: Could not fetch data type list from source window, aborting.");
|
||||
if (data) free(data);
|
||||
free(e);
|
||||
return;
|
||||
}
|
||||
|
@ -1594,6 +1595,8 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
e->source = target->source;
|
||||
ecore_event_add(ECORE_X_EVENT_XDND_ENTER, e,
|
||||
_ecore_x_event_free_xdnd_enter, NULL);
|
||||
|
||||
if (data) free(data);
|
||||
}
|
||||
/* Message Type: XdndPosition target */
|
||||
else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_POSITION)
|
||||
|
|
Loading…
Reference in New Issue