Commit fe31d77d authored by Thomas Heller's avatar Thomas Heller

PyType_stgdict() returns a borrowed reference which must not be

Py_DECREF'd.
parent ef4fff34
......@@ -469,13 +469,11 @@ StructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct)
if (!prop) {
Py_DECREF(pair);
Py_DECREF((PyObject *)stgdict);
return -1;
}
if (-1 == PyDict_SetItem(realdict, name, prop)) {
Py_DECREF(prop);
Py_DECREF(pair);
Py_DECREF((PyObject *)stgdict);
return -1;
}
Py_DECREF(pair);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment