Issue #18408: Fix error handling in PyBytes_FromObject()
_PyBytes_Resize(&new) sets new to NULL on error, don't call Py_DECREF() with NULL.
This commit is contained in:
parent
cc024d1820
commit
986e224d5a
|
@ -2660,9 +2660,8 @@ PyBytes_FromObject(PyObject *x)
|
|||
return new;
|
||||
|
||||
error:
|
||||
/* Error handling when new != NULL */
|
||||
Py_XDECREF(it);
|
||||
Py_DECREF(new);
|
||||
Py_XDECREF(new);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue