From: Marc-André Lemburg Date: Wed, 29 May 2002 13:46:29 +0000 (+0000) Subject: Fix a possible segfault. Found be Neal Norvitz. X-Git-Tag: v2.3c1~5571 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41644392407eadb07dd09a08e5d316c4edf3fcbb;p=python Fix a possible segfault. Found be Neal Norvitz. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index e24453d17d..2cb97bcf09 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; }