bpo-37417: Fix error handling in bytearray.extend. (GH-14407)

This commit is contained in:
Brandt Bucher 2019-06-26 12:06:18 -07:00 committed by Serhiy Storchaka
parent 5150d32792
commit 2a7d596f27
3 changed files with 11 additions and 0 deletions

View file

@ -1698,6 +1698,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints)
}
Py_DECREF(bytearray_obj);
if (PyErr_Occurred()) {
return NULL;
}
Py_RETURN_NONE;
}