aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/import.c
diff options
context:
space:
mode:
authorValery Fedorenko <federicovalenso@gmail.com>2024-11-08 13:19:15 +0300
committerGitHub <noreply@github.com>2024-11-08 15:49:15 +0530
commit9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2 (patch)
treea88d59f21c5c01db066a91292213de26cc669254 /Python/import.c
parent06a8b0bb5ee0d01ed93315137c41c104a11e4640 (diff)
downloadcpython-9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2.tar.gz
cpython-9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2.zip
gh-126171: fix possible null dereference in _imp_find_frozen_impl (#126566)
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index d8ad37b2422..29bd8bf68ff 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;
}
}