]> granicus.if.org Git - python/commitdiff
also decref the right thing
authorBenjamin Peterson <benjamin@python.org>
Mon, 2 Jan 2012 16:12:13 +0000 (10:12 -0600)
committerBenjamin Peterson <benjamin@python.org>
Mon, 2 Jan 2012 16:12:13 +0000 (10:12 -0600)
Objects/unicodeobject.c

index e152e732a48fd756a4a555ecf8c8536f045a9bbe..9a9703a4458d67c40c42cc7452707055d69b3c3f 100644 (file)
@@ -9140,7 +9140,7 @@ PyUnicode_Count(PyObject *str,
         return -1;
     }
     if (PyUnicode_READY(sub_obj) == -1 || PyUnicode_READY(str_obj) == -1) {
-        Py_DECREF(substr);
+        Py_DECREF(sub_obj);
         Py_DECREF(str_obj);
         return -1;
     }