Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e6cbf1

Browse files
author
Thomas Heller
committed
For easier merging, revert ths change; it will be brought back in when
the trunk is merged.
1 parent 7f16288 commit 3e6cbf1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/_ctypes/stgdict.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,13 @@ StructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct)
457457

458458
if (!prop) {
459459
Py_DECREF(pair);
460+
Py_DECREF((PyObject *)stgdict);
460461
return -1;
461462
}
462463
if (-1 == PyDict_SetItem(realdict, name, prop)) {
463464
Py_DECREF(prop);
464465
Py_DECREF(pair);
466+
Py_DECREF((PyObject *)stgdict);
465467
return -1;
466468
}
467469
Py_DECREF(pair);

0 commit comments

Comments
 (0)