summaryrefslogtreecommitdiffstats
path: root/Python/crossinterp_exceptions.h
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-04-26 10:14:14 (GMT)
committerGitHub <noreply@github.com>2025-04-26 10:14:14 (GMT)
commitca12a744abd02d0d36adfb1444c1ba31623d617d (patch)
tree5553969df302be755f9a4fc130bed9c594f139b9 /Python/crossinterp_exceptions.h
parent8a4d4f37abb9fa639fdc5d7003c4067904cdcc6b (diff)
downloadcpython-ca12a744abd02d0d36adfb1444c1ba31623d617d.zip
cpython-ca12a744abd02d0d36adfb1444c1ba31623d617d.tar.gz
cpython-ca12a744abd02d0d36adfb1444c1ba31623d617d.tar.bz2
gh-132781: fix refleaks in `crossinterp_exceptions.h` post gh-132782 (#132989)
Diffstat (limited to 'Python/crossinterp_exceptions.h')
-rw-r--r--Python/crossinterp_exceptions.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/crossinterp_exceptions.h b/Python/crossinterp_exceptions.h
index 857c4d1..ca4ca1c 100644
--- a/Python/crossinterp_exceptions.h
+++ b/Python/crossinterp_exceptions.h
@@ -110,6 +110,7 @@ set_notshareableerror(PyThreadState *tstate, PyObject *cause, int force, const c
}
else {
_ensure_notshareableerror(tstate, cause, force, msgobj);
+ Py_DECREF(msgobj);
}
}
@@ -123,6 +124,7 @@ format_notshareableerror_v(PyThreadState *tstate, PyObject *cause, int force,
}
else {
_ensure_notshareableerror(tstate, cause, force, msgobj);
+ Py_DECREF(msgobj);
}
}