diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-05-28 22:31:42 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-05-28 22:31:42 (GMT) |
commit | ce174b991223c85afba55a24e7adc9c8156f7d48 (patch) | |
tree | 90f3d3cdb4b83865cfaeaa6674165b3c22df7ef0 /plugins/pychrysalide/format | |
parent | 2700e6892a0c0d78baf7228040aa07a1e21c6f53 (diff) |
Fixed several memory leaks.
Diffstat (limited to 'plugins/pychrysalide/format')
-rw-r--r-- | plugins/pychrysalide/format/format.c | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/format/known.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/pychrysalide/format/format.c b/plugins/pychrysalide/format/format.c index 1b34b38..6761392 100644 --- a/plugins/pychrysalide/format/format.c +++ b/plugins/pychrysalide/format/format.c @@ -290,6 +290,8 @@ static SourceEndian py_binary_format_get_endianness_wrapper(const GBinFormat *fo } + Py_DECREF(pyobj); + PyGILState_Release(gstate); return result; diff --git a/plugins/pychrysalide/format/known.c b/plugins/pychrysalide/format/known.c index ff4ca0a..a2fc18c 100644 --- a/plugins/pychrysalide/format/known.c +++ b/plugins/pychrysalide/format/known.c @@ -281,6 +281,8 @@ static char *py_known_format_get_key_wrapper(const GKnownFormat *format) } + Py_DECREF(pyobj); + PyGILState_Release(gstate); return result; @@ -340,6 +342,8 @@ static char *py_known_format_get_description_wrapper(const GKnownFormat *format) } + Py_DECREF(pyobj); + PyGILState_Release(gstate); return result; @@ -406,6 +410,8 @@ static bool py_known_format_analyze_wrapper(GKnownFormat *format, wgroup_id_t gi } + Py_DECREF(pyobj); + PyGILState_Release(gstate); return result; @@ -464,6 +470,8 @@ static void py_known_format_complete_analysis_wrapper(GKnownFormat *format, wgro } + Py_DECREF(pyobj); + PyGILState_Release(gstate); } |