[Python-checkins] cpython (3.2): Issue #15741: Fix potential NULL dereference. Found by Coverity.

stefan.krah python-checkins at python.org
Mon Aug 20 17:36:17 CEST 2012


http://hg.python.org/cpython/rev/d5ee1a06101f
changeset:   78674:d5ee1a06101f
branch:      3.2
parent:      78670:03c98d05b140
user:        Stefan Krah <skrah at bytereef.org>
date:        Mon Aug 20 17:19:50 2012 +0200
summary:
  Issue #15741: Fix potential NULL dereference. Found by Coverity.

files:
  Python/bltinmodule.c |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -631,6 +631,8 @@
             mod_ty mod;
 
             arena = PyArena_New();
+            if (arena == NULL)
+                goto error;
             mod = PyAST_obj2mod(cmd, arena, mode);
             if (mod == NULL) {
                 PyArena_Free(arena);

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


More information about the Python-checkins mailing list