[Python-checkins] cpython (3.3): Check return value of flush_character_buffer()

christian.heimes python-checkins at python.org
Sat Jul 20 22:42:15 CEST 2013


http://hg.python.org/cpython/rev/366eebaad633
changeset:   84743:366eebaad633
branch:      3.3
parent:      84741:654268ff29b5
user:        Christian Heimes <christian at cheimes.de>
date:        Sat Jul 20 22:41:58 2013 +0200
summary:
  Check return value of flush_character_buffer()
CID 486663

files:
  Modules/pyexpat.c |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1503,7 +1503,9 @@
       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);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list