From bcda268c0917aa922a10950fdd3aeecb20a7a06f Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 19 Jan 2025 11:39:03 +0100 Subject: [PATCH] Fix crash in PyIShellIconOverlayIdentifier::IsMemberOf with Python 3.12 --- com/win32comext/shell/src/PyIShellIconOverlayIdentifier.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/com/win32comext/shell/src/PyIShellIconOverlayIdentifier.cpp b/com/win32comext/shell/src/PyIShellIconOverlayIdentifier.cpp index 5e465f8f3d..016bef7ced 100644 --- a/com/win32comext/shell/src/PyIShellIconOverlayIdentifier.cpp +++ b/com/win32comext/shell/src/PyIShellIconOverlayIdentifier.cpp @@ -43,9 +43,8 @@ PyObject *PyIShellIconOverlayIdentifier::IsMemberOf(PyObject *self, PyObject *ar HRESULT hr; PY_INTERFACE_PRECALL; hr = pISIOI->IsMemberOf(path, attrib); - PyWinObject_FreeWCHAR(path); - PY_INTERFACE_POSTCALL; + PyWinObject_FreeWCHAR(path); if (FAILED(hr)) return PyCom_BuildPyException(hr, pISIOI, IID_IShellIconOverlayIdentifier);