Commit 0c6b0e9d authored by Thomas Heller's avatar Thomas Heller

Fix a leak that would happen under error conditions (found by Coverty).

parent aa47570b
......@@ -1317,6 +1317,7 @@ Z_set(void *ptr, PyObject *value, unsigned size)
if (-1 == PyUnicode_AsWideChar((PyUnicodeObject *)value,
buffer, PyUnicode_GET_SIZE(value))) {
Py_DECREF(value);
Py_DECREF(keep);
return NULL;
}
Py_DECREF(value);
......
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