mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
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 <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
7a39f32816
commit
3a191af838
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user