https://github.com/python/cpython/commit/23468acac4f682f079abc09e93492990d61e56c2
commit: 23468acac4f682f079abc09e93492990d61e56c2
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2024-11-08T16:25:38+05:30
summary:

[3.13] gh-126171: fix possible null dereference in _imp_find_frozen_impl 
(GH-126566) (#126567)

gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566)
(cherry picked from commit 9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2)

Co-authored-by: Valery Fedorenko <[email protected]>

files:
M Python/import.c

diff --git a/Python/import.c b/Python/import.c
index 2ec596828e3e6f..1541d5a55b82ec 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -4436,7 +4436,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;
         }
     }

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to