From 92c2dc0174f7a67ba3ec3f5b55e19a2c52134f87 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 6 Jan 2015 12:06:12 +0100 Subject: [PATCH] + fix one more missing va_end --- src/Base/Interpreter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index 9ee45b8f6a..9d0617c5e6 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -472,10 +472,13 @@ void InterpreterSingleton::runMethod(PyObject *pobject, const char *method, PyGILStateLocker locker; pmeth = PyObject_GetAttrString(pobject, method); - if (pmeth == NULL) /* get callable object */ + if (pmeth == NULL) { /* get callable object */ + va_end(argslist); throw Exception("Error running InterpreterSingleton::RunMethod() method not defined"); /* bound method? has self */ + } pargs = Py_VaBuildValue(argfmt, argslist); /* args: c->python */ + va_end(argslist); if (pargs == NULL) { Py_DECREF(pmeth);