[Python-checkins] cpython: Fix NULL ptr dereferencing in local_timezone(). nameo can be NULL

christian.heimes python-checkins at python.org
Sat Jun 29 20:52:43 CEST 2013


http://hg.python.org/cpython/rev/ecc7f6f069f4
changeset:   84376:ecc7f6f069f4
user:        Christian Heimes <christian at cheimes.de>
date:        Sat Jun 29 20:52:33 2013 +0200
summary:
  Fix NULL ptr dereferencing in local_timezone(). nameo can be NULL
CID 1040362 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
var_deref_op: Dereferencing null pointer _py_decref_tmp.

files:
  Modules/_datetimemodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -4749,7 +4749,7 @@
             goto error;
     }
     result = new_timezone(delta, nameo);
-    Py_DECREF(nameo);
+    Py_XDECREF(nameo);
   error:
     Py_DECREF(delta);
     return result;

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


More information about the Python-checkins mailing list