diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.cpp b/src/modules/imageresizer/dll/ContextMenuHandler.cpp index da77e123f9..556a0b1891 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.cpp +++ b/src/modules/imageresizer/dll/ContextMenuHandler.cpp @@ -376,7 +376,7 @@ HRESULT __stdcall CContextMenuHandler::GetState(IShellItemArray* psiItemArray, B // TODO: Instead, detect whether there's a WIC codec installed that can handle this file AssocGetPerceivedType(pszExt, &type, &flag, NULL); - free(pszPath); + CoTaskMemFree(pszPath); // If selected file is an image... if (type == PERCEIVED_TYPE_IMAGE) {