]> granicus.if.org Git - python/commitdiff
Issue #29049: Remove unnecessary Py_DECREF
authorINADA Naoki <songofacandy@gmail.com>
Mon, 26 Dec 2016 09:52:46 +0000 (18:52 +0900)
committerINADA Naoki <songofacandy@gmail.com>
Mon, 26 Dec 2016 09:52:46 +0000 (18:52 +0900)
Python/ceval.c

index 08fc27f2468b6d7149b26ef467e4b5072bf41e2c..5519ac7555a804813b251cc55f3b13e39ad7cb47 100644 (file)
@@ -4153,9 +4153,9 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals,
             gen = PyGen_NewWithQualName(f, name, qualname);
         }
         if (gen == NULL) {
-            Py_DECREF(f);
             return NULL;
         }
+
         _PyObject_GC_TRACK(f);
 
         if (is_coro && coro_wrapper != NULL) {