From 75cabb07be07c5cc401960f4a0633f8416c4636c Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 20 Oct 2019 00:27:58 +0200 Subject: [PATCH] [SHELL32] Properly release an StgMedium --- dll/win32/shell32/COpenWithMenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/COpenWithMenu.cpp b/dll/win32/shell32/COpenWithMenu.cpp index db2a76eac05..6ccc664afc9 100644 --- a/dll/win32/shell32/COpenWithMenu.cpp +++ b/dll/win32/shell32/COpenWithMenu.cpp @@ -1369,14 +1369,14 @@ COpenWithMenu::Initialize(PCIDLIST_ABSOLUTE pidlFolder, { TRACE("pidl is not a file\n"); GlobalUnlock(medium.hGlobal); - GlobalFree(medium.hGlobal); + ReleaseStgMedium(&medium); return E_FAIL; } pidl = ILCombine(pidlFolder2, pidlChild); GlobalUnlock(medium.hGlobal); - GlobalFree(medium.hGlobal); + ReleaseStgMedium(&medium); if (!pidl) {