commit | 074ebced1b0c43dda6a6fdef8865050d019316a7 | [log] [tgz] |
---|---|---|
author | Christian Heimes <christian@cheimes.de> | Mon Sep 10 02:54:51 2012 +0200 |
committer | Christian Heimes <christian@cheimes.de> | Mon Sep 10 02:54:51 2012 +0200 |
tree | de5f256e931926c12179320d6896160158c65dd0 | |
parent | 8b54d6d73312186b4736cdf69a4e2e46ba15784c [diff] [blame] |
PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak.
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 3249ccc..00f2e47 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c
@@ -192,8 +192,10 @@ 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 *);