mirror of https://github.com/python/cpython
Fix a leak that would happen under error conditions (found by Coverty).
This commit is contained in:
parent
aa47570bdf
commit
0c6b0e9d05
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue