From 053f76086b588f2129b0a8d62f0a64bd1f50b98d 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 9ee45b8f6..9d0617c5e 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);