From 3a191af838aa3c3854e20a987e0dc4b36827db7f Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 18 May 2014 21:31:52 +0200 Subject: [PATCH] WINGs: fix probable crash in drag'n'drop (Coverity #50264) As reported by Coverity, the structure containing the callback functions to handle the drag-and-drop actions could be freed but later re-used. The correct behaviour is to keep the allocated memory for the structure. Signed-off-by: Christophe CURIS --- WINGs/dragdestination.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/WINGs/dragdestination.c b/WINGs/dragdestination.c index 2dba64ab..2833b886 100644 --- a/WINGs/dragdestination.c +++ b/WINGs/dragdestination.c @@ -974,8 +974,6 @@ void WMSetViewDragDestinationProcs(WMView * view, WMDragDestinationProcs * procs { if (view->dragDestinationProcs == NULL) { view->dragDestinationProcs = wmalloc(sizeof(WMDragDestinationProcs)); - } else { - free(view->dragDestinationProcs); } *view->dragDestinationProcs = *procs;