summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-20 20:41:58 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-20 20:41:58 (GMT)
commit09994a9c595b35e0ee99e69172abf8b8a1ff7994 (patch)
treee4cf63779453b48cc9c139ed4eaa6c26198f7ed1 /Modules
parent27c4c3ec799dfe95bd80706a6bc9a39f2af6da6f (diff)
downloadcpython-09994a9c595b35e0ee99e69172abf8b8a1ff7994.zip
cpython-09994a9c595b35e0ee99e69172abf8b8a1ff7994.tar.gz
cpython-09994a9c595b35e0ee99e69172abf8b8a1ff7994.tar.bz2
Check return value of flush_character_buffer()
CID 486663
Diffstat (limited to 'Modules')
-rw-r--r--Modules/pyexpat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 01ac14e..07b1348d 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1503,7 +1503,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 */
free(self->buffer);