summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-21 09:37:27 (GMT)
committerChristian Heimes <christian@python.org>2016-09-21 09:37:27 (GMT)
commit2f2fee19ec63a09b184fbe09135ecb2f16a0e257 (patch)
tree7d29ab47d5691028799f81ae63215313064a8ea7 /Objects/abstract.c
parent1c56bf0bad6453e6c244ec345ad0eb4d4d1ae15c (diff)
downloadcpython-2f2fee19ec63a09b184fbe09135ecb2f16a0e257.zip
cpython-2f2fee19ec63a09b184fbe09135ecb2f16a0e257.tar.gz
cpython-2f2fee19ec63a09b184fbe09135ecb2f16a0e257.tar.bz2
va_end() all va_copy()ed va_lists.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index c6c957b..c167125 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2702,6 +2702,7 @@ objargs_mkstack(PyObject **small_stack, Py_ssize_t small_stack_size,
else {
stack = PyMem_Malloc(n * sizeof(stack[0]));
if (stack == NULL) {
+ va_end(countva);
PyErr_NoMemory();
return NULL;
}
@@ -2710,6 +2711,7 @@ objargs_mkstack(PyObject **small_stack, Py_ssize_t small_stack_size,
for (i = 0; i < n; ++i) {
stack[i] = va_arg(va, PyObject *);
}
+ va_end(countva);
return stack;
}