Commit 074ebced authored by Christian Heimes's avatar Christian Heimes

PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak.

parent 8b54d6d7
......@@ -192,8 +192,10 @@ PyTuple_Pack(Py_ssize_t n, ...)
va_start(vargs, n);
result = PyTuple_New(n);
if (result == NULL)
if (result == NULL) {
va_end(vargs);
return NULL;
}
items = ((PyTupleObject *)result)->ob_item;
for (i = 0; i < n; i++) {
o = va_arg(vargs, PyObject *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment