summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/tupleobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 013db69..b76125a 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -210,8 +210,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 *);