summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-06-21 09:31:59 -0600
committerSteve Dower <steve.dower@python.org>2019-06-21 08:31:59 -0700
commit08286d52b29de604a4b187bf1f0d4209e39c926c (patch)
tree36af2d00c327f0482135deac89d724481ce2ee76 /Python/sysmodule.c
parent08970cb03c61f62f4f69e7769d0075fa66bb86aa (diff)
downloadcpython-git-08286d52b29de604a4b187bf1f0d4209e39c926c.tar.gz
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
Also, add a missing call to va_end() in PySys_Audit().
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 8da839c5a5..d1a6c6a026 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -182,6 +182,7 @@ PySys_Audit(const char *event, const char *argFormat, ...)
va_list args;
va_start(args, argFormat);
eventArgs = Py_VaBuildValue(argFormat, args);
+ va_end(args);
if (eventArgs && !PyTuple_Check(eventArgs)) {
PyObject *argTuple = PyTuple_Pack(1, eventArgs);
Py_DECREF(eventArgs);