From: Eddie Elizondo Date: Tue, 26 Nov 2019 03:07:37 +0000 (-0800) Subject: closes bpo-38803: Fix leak in posixmodule. (GH-17373) X-Git-Tag: v3.9.0a2~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4db1f05e9a5828f6b287f99067362fa0e5732e8;p=thirdparty%2FPython%2Fcpython.git closes bpo-38803: Fix leak in posixmodule. (GH-17373) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index f7386300c569..898547113732 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;