Check return value of flush_character_buffer()

CID 486663
This commit is contained in:
Christian Heimes 2013-07-20 22:41:58 +02:00
parent 27c4c3ec79
commit 09994a9c59
1 changed files with 3 additions and 1 deletions

View File

@ -1503,7 +1503,9 @@ xmlparse_setattro(xmlparseobject *self, PyObject *name, PyObject *v)
if (self->buffer != NULL) { if (self->buffer != NULL) {
/* there is already a buffer */ /* there is already a buffer */
if (self->buffer_used != 0) { if (self->buffer_used != 0) {
flush_character_buffer(self); if (flush_character_buffer(self) < 0) {
return -1;
}
} }
/* free existing buffer */ /* free existing buffer */
free(self->buffer); free(self->buffer);