summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@gmail.com>2019-06-26 19:06:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-06-26 19:06:18 (GMT)
commit2a7d596f27b2342caf168a03c95ebf3b56e5dbbd (patch)
tree58e72304033f783f19450f082c226cefa1108671 /Objects
parent5150d327924959639215ed0a78feffc0d88258da (diff)
downloadcpython-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.zip
cpython-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.tar.gz
cpython-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.tar.bz2
bpo-37417: Fix error handling in bytearray.extend. (GH-14407)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index c684db7..1bb19a9 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -1698,6 +1698,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints)
}
Py_DECREF(bytearray_obj);
+ if (PyErr_Occurred()) {
+ return NULL;
+ }
+
Py_RETURN_NONE;
}