Skip to content

Commit b19e86b

Browse files
authored
Fix for issue #2415: Python 3.12.7 interpreter crashes (#2417)
when accessing a COM Record field.
1 parent a8f0b0e commit b19e86b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

com/win32com/src/PyRecord.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ PyObject *PyRecord::getattro(PyObject *self, PyObject *obname)
478478

479479
PY_INTERFACE_PRECALL;
480480
HRESULT hr = pyrec->pri->GetFieldNoCopy(pyrec->pdata, wname, &vret, &sub_data);
481-
PyWinObject_FreeWCHAR(wname);
482481
PY_INTERFACE_POSTCALL;
482+
PyWinObject_FreeWCHAR(wname);
483483

484484
if (FAILED(hr)) {
485485
if (hr == TYPE_E_FIELDNOTFOUND) {

0 commit comments

Comments
 (0)