https://github.com/python/cpython/commit/c31ea74970eaf6a3e9ab0db870131c53dcc0c999
commit: c31ea74970eaf6a3e9ab0db870131c53dcc0c999
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2025-12-16T15:42:43+05:30
summary:

[3.14] gh-142595: Amend be5e0dcdedb (fix NULL pointer dereference) (GH-142775) 
(#142788)

gh-142595: Amend be5e0dcdedb (fix NULL pointer dereference) (GH-142775)
(cherry picked from commit 15a9762500b3d9a13206aa54d8695513efaf3b55)

Co-authored-by: Sergey B Kirpichev <[email protected]>

files:
M Modules/_decimal/_decimal.c

diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 49dc45a4aff5c7..4516c7d847bded 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -6040,8 +6040,9 @@ _decimal_exec(PyObject *m)
 
     /* DecimalTuple */
     ASSIGN_PTR(collections, PyImport_ImportModule("collections"));
-    obj = PyObject_CallMethod(collections, "namedtuple", "(ss)", 
"DecimalTuple",
-                              "sign digits exponent");
+    ASSIGN_PTR(obj, PyObject_CallMethod(collections, "namedtuple", "(ss)",
+                                        "DecimalTuple",
+                                        "sign digits exponent"));
     if (!PyType_Check(obj)) {
         PyErr_SetString(PyExc_TypeError,
                         "type is expected from namedtuple call");

_______________________________________________
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