From: Christian Heimes Date: Sat, 29 Jun 2013 18:52:33 +0000 (+0200) Subject: Fix NULL ptr dereferencing in local_timezone(). nameo can be NULL X-Git-Tag: v3.4.0a1~364 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b91ffaa1d8a0b258ff603a956b19f6f2aeeefb47;p=python 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. --- diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 46f38c5e82..34205a4391 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -4749,7 +4749,7 @@ local_timezone(PyDateTime_DateTime *utc_time) goto error; } result = new_timezone(delta, nameo); - Py_DECREF(nameo); + Py_XDECREF(nameo); error: Py_DECREF(delta); return result;