summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-20 20:42:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-20 20:42:06 (GMT)
commit5df8ff01d914d1757990438ca6c518d0b1497e96 (patch)
tree3d1a39e29b4bddbbb0e8cfe179d5826ca083d65a /Modules/pyexpat.c
parent7bc80fcf4e32ed82b7932f3658474408a5c7a0a2 (diff)
parent09994a9c595b35e0ee99e69172abf8b8a1ff7994 (diff)
downloadcpython-5df8ff01d914d1757990438ca6c518d0b1497e96.zip
cpython-5df8ff01d914d1757990438ca6c518d0b1497e96.tar.gz
cpython-5df8ff01d914d1757990438ca6c518d0b1497e96.tar.bz2
Check return value of flush_character_buffer()
CID 486663
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 82d9d6a..87cec92 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1521,7 +1521,9 @@ xmlparse_setattro(xmlparseobject *self, PyObject *name, PyObject *v)
if (self->buffer != NULL) {
/* there is already a buffer */
if (self->buffer_used != 0) {
- flush_character_buffer(self);
+ if (flush_character_buffer(self) < 0) {
+ return -1;
+ }
}
/* free existing buffer */
PyMem_Free(self->buffer);