pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/f9dac4e2ebbb913479bf882f0ac582040ba54ea3

faa60c69660fa.css" /> gh-145376: Avoid reference leaks in failure path of _functoolsmodule.… · python/cpython@f9dac4e · GitHub
Skip to content

Commit f9dac4e

Browse files
authored
gh-145376: Avoid reference leaks in failure path of _functoolsmodule.c method partial_new (GH-145423)
1 parent 3fe7849 commit f9dac4e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Modules/_functoolsmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ partial_new(PyTypeObject *type, PyObject *args, PyObject *kw)
252252
}
253253
PyObject *item;
254254
PyObject *tot_args = PyTuple_New(tot_nargs);
255+
if (tot_args == NULL) {
256+
Py_DECREF(new_args);
257+
Py_DECREF(pto);
258+
return NULL;
259+
}
255260
for (Py_ssize_t i = 0, j = 0; i < tot_nargs; i++) {
256261
if (i < npargs) {
257262
item = PyTuple_GET_ITEM(pto_args, i);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy