]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-38803: Fix leak in posixmodule. (GH-17373)
authorEddie Elizondo <eelizondo@fb.com>
Tue, 26 Nov 2019 03:07:37 +0000 (19:07 -0800)
committerBenjamin Peterson <benjamin@python.org>
Tue, 26 Nov 2019 03:07:37 +0000 (19:07 -0800)
Modules/posixmodule.c

index f7386300c5691ac7f8be7a4625aa31c91b151cf0..898547113732a84eb3234f9cc0fe417b8788b9a7 100644 (file)
@@ -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;