]> granicus.if.org Git - python/commitdiff
Fix a possible segfault. Found be Neal Norvitz.
authorMarc-André Lemburg <mal@egenix.com>
Wed, 29 May 2002 13:46:29 +0000 (13:46 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Wed, 29 May 2002 13:46:29 +0000 (13:46 +0000)
Objects/unicodeobject.c

index e24453d17d78b05efcb2ce94d7e5263796fdc634..2cb97bcf09c863b5b004db1a9ad708d5649a33cc 100644 (file)
@@ -2890,7 +2890,7 @@ int PyUnicode_Find(PyObject *str,
        return -2;
     substr = PyUnicode_FromObject(substr);
     if (substr == NULL) {
-       Py_DECREF(substr);
+       Py_DECREF(str);
        return -2;
     }