From: Valery Fedorenko Date: Fri, 8 Nov 2024 10:19:15 +0000 (+0300) Subject: gh-126171: fix possible null dereference in _imp_find_frozen_impl (#126566) X-Git-Tag: v3.14.0a2~125 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2;p=thirdparty%2FPython%2Fcpython.git gh-126171: fix possible null dereference in _imp_find_frozen_impl (#126566) --- diff --git a/Python/import.c b/Python/import.c index d8ad37b24227..29bd8bf68ff5 100644 --- a/Python/import.c +++ b/Python/import.c @@ -4424,7 +4424,7 @@ _imp_find_frozen_impl(PyObject *module, PyObject *name, int withdata) if (info.origname != NULL && info.origname[0] != '\0') { origname = PyUnicode_FromString(info.origname); if (origname == NULL) { - Py_DECREF(data); + Py_XDECREF(data); return NULL; } }