]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 8 Nov 2024 10:56:08 +0000 (11:56 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2024 10:56:08 +0000 (16:26 +0530)
gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566)
(cherry picked from commit 9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2)

Co-authored-by: Valery Fedorenko <federicovalenso@gmail.com>
Python/import.c

index db70909982fa3eb2a9f64ce06543cd45f9d0c41a..4d0b7fd95569b3a8da692dbf5ab8dd58b443a9c8 100644 (file)
@@ -3539,7 +3539,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;
         }
     }