summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-06-21 16:45:13 (GMT)
committerGitHub <noreply@github.com>2019-06-21 16:45:13 (GMT)
commit6c7947713a40851e123493ca0fe8f2791d7ed2a6 (patch)
tree33bfc42be84918ab82bf48c2bb884e0867842182 /Python
parent43615485f1222cd9a94421a96cb7110bb52e1b8b (diff)
downloadcpython-6c7947713a40851e123493ca0fe8f2791d7ed2a6.zip
cpython-6c7947713a40851e123493ca0fe8f2791d7ed2a6.tar.gz
cpython-6c7947713a40851e123493ca0fe8f2791d7ed2a6.tar.bz2
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')
-rw-r--r--Python/sysmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 12b1bd7..fbccea3 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -160,6 +160,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);