diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/python_api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c index 8309e5ec..ee8a874c 100644 --- a/src/plugins/python_api.c +++ b/src/plugins/python_api.c @@ -740,7 +740,9 @@ python_api_settings_get_string(PyObject *self, PyObject *args) disable_python_threads(); if (res) { - return Py_BuildValue("s", res); + PyObject *pyres = Py_BuildValue("s", res); + free(res); + return pyres; } else { Py_RETURN_NONE; } |