app_python: free buf in case of get exception error
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 06:45:18 +0000 (08:45 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 06:45:18 +0000 (08:45 +0200)
src/modules/app_python/python_support.c

index 57a14d0..b48bf2c 100644 (file)
@@ -54,6 +54,7 @@ void python_handle_exception(const char *fmt, ...)
        PyErr_Clear();
        if (exception == NULL) {
                LM_ERR("Can't get traceback, PyErr_Fetch() has failed.\n");
+               if (srcbuf) pkg_free(srcbuf);
                return;
        }