summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
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 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);