summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEddie Elizondo <eelizondo@fb.com>2019-11-25 19:07:37 -0800
committerBenjamin Peterson <benjamin@python.org>2019-11-25 19:07:37 -0800
commite4db1f05e9a5828f6b287f99067362fa0e5732e8 (patch)
treec96326933f50a21837bc910c57e6640c6607c099
parentf8a6316778faff3991144c3aec4fa92d7b30a72b (diff)
downloadcpython-git-e4db1f05e9a5828f6b287f99067362fa0e5732e8.tar.gz
closes bpo-38803: Fix leak in posixmodule. (GH-17373)
-rw-r--r--Modules/posixmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f7386300c5..8985471137 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7589,6 +7589,7 @@ wait_helper(pid_t pid, int status, struct rusage *ru)
/* XXX(nnorwitz): Copied (w/mods) from resource.c, there should be only one. */
result = PyStructSequence_New((PyTypeObject*) struct_rusage);
+ Py_DECREF(struct_rusage);
if (!result)
return NULL;