Kaydet (Commit) 986e224d authored tarafından Victor Stinner's avatar Victor Stinner

Issue #18408: Fix error handling in PyBytes_FromObject()

_PyBytes_Resize(&new) sets new to NULL on error, don't call Py_DECREF() with NULL.
üst cc024d18
......@@ -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;
}
......
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