Always call json_object_put() with a valid "jlist" pointer. Signed-off-by: Benjamin ROBIN <dev@xxxxxxxxxxxxx> --- src/libkshark-configio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libkshark-configio.c b/src/libkshark-configio.c index 853e056..49f957b 100644 --- a/src/libkshark-configio.c +++ b/src/libkshark-configio.c @@ -777,7 +777,7 @@ static bool kshark_plugin_from_json(struct kshark_context *kshark_ctx, static bool kshark_all_plugins_from_json(struct kshark_context *kshark_ctx, struct json_object *jobj) { - struct json_object *jlist, *jfile; + struct json_object *jlist = NULL, *jfile = NULL; int i, n_plugins; if (!kshark_ctx || !jobj) @@ -902,7 +902,7 @@ static bool kshark_stream_plugins_from_json(struct kshark_context *kshark_ctx, int i, n_plugins; bool active; - jplg = jname = jstatus = NULL; + jlist = jplg = jname = jstatus = NULL; if (!kshark_ctx || !stream || !jobj) return false; -- 2.43.0