From 757c57634e567b816723b67a52529a0863aa6cd0 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Wed, 14 May 2014 20:15:30 -0500 Subject: [PATCH] winemac: Fix a memory leak if posting WM_DROPFILES fails. --- dlls/winemac.drv/dragdrop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winemac.drv/dragdrop.c b/dlls/winemac.drv/dragdrop.c index 612a8682fba..ad0bc8ccccb 100644 --- a/dlls/winemac.drv/dragdrop.c +++ b/dlls/winemac.drv/dragdrop.c @@ -466,8 +466,8 @@ BOOL query_drag_drop(macdrv_query* query) ret = PostMessageW(hwnd, WM_DROPFILES, (WPARAM)hdrop, 0L); /* hdrop is owned by the message and freed when the recipient calls DragFinish(). */ } - else - GlobalFree(hdrop); + + if (!ret) GlobalFree(hdrop); } } -- 2.11.4.GIT