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

This commit is contained in:
Thomas Heller 2006-03-16 20:02:36 +00:00
parent aa47570bdf
commit 0c6b0e9d05
1 changed files with 1 additions and 0 deletions

View File

@ -1317,6 +1317,7 @@ Z_set(void *ptr, PyObject *value, unsigned size)
if (-1 == PyUnicode_AsWideChar((PyUnicodeObject *)value, if (-1 == PyUnicode_AsWideChar((PyUnicodeObject *)value,
buffer, PyUnicode_GET_SIZE(value))) { buffer, PyUnicode_GET_SIZE(value))) {
Py_DECREF(value); Py_DECREF(value);
Py_DECREF(keep);
return NULL; return NULL;
} }
Py_DECREF(value); Py_DECREF(value);