mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Check return value of flush_character_buffer()
CID 486663
This commit is contained in:
commit
5df8ff01d9
1 changed files with 3 additions and 1 deletions
|
@ -1521,7 +1521,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 */
|
||||||
PyMem_Free(self->buffer);
|
PyMem_Free(self->buffer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue