[Python-checkins] cpython (merge 3.2 -> default): PyTuple_Pack() was missing va_end() in its error branch which lead to a
christian.heimes
python-checkins at python.org
Mon Sep 10 02:55:50 CEST 2012
http://hg.python.org/cpython/rev/033b409f7cd6
changeset: 78938:033b409f7cd6
parent: 78936:1349e9537f91
parent: 78937:bbc580e004d7
user: Christian Heimes <christian at cheimes.de>
date: Mon Sep 10 02:55:13 2012 +0200
summary:
PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak.
files:
Objects/tupleobject.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -210,8 +210,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 *);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list