Fix memleaks reported by Coverity: ecore_x_window_prop_property_get

allocates space for 'data'. We need to free that if we are going to
return before using it.

NB: Fixes Coverity CID1039270

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 12:17:58 +01:00
parent aea9e86eb4
commit 5969c97f7a
1 changed files with 5 additions and 1 deletions

View File

@ -1415,6 +1415,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
selection,
xevent->xselection.requestor,
CurrentTime);
if (data) free(data);
return;
}
}
@ -1426,7 +1427,10 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
e = calloc(1, sizeof(Ecore_X_Event_Selection_Notify));
if (!e)
return;
{
if (data) free(data);
return;
}
e->win = xevent->xselection.requestor;
e->time = xevent->xselection.time;