diff options
author | James Booth <boothj5@gmail.com> | 2016-07-25 21:56:38 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-07-25 21:56:38 +0100 |
commit | 943e91268c2489600ac1f28836fd0e24a0fd8dc2 (patch) | |
tree | a3e8bdba66089fff33598e5bc3d6de19f04de946 /src/plugins | |
parent | 139e53f388e06a91bebddbf144556db05ea61898 (diff) | |
download | profani-tty-943e91268c2489600ac1f28836fd0e24a0fd8dc2.tar.gz |
Fix memory leaks
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; } |