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) {