In kshark_config_doc_get() if the outputted document is of type KS_CONFIG_STRING, do not try to free the old string before setting the new one. Note that those strings are owned by the json object. Reported-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> Fixes: b3b5b6504b1 ("kernel-shark-qt: Add I/O for configuration data.") Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> --- kernel-shark/src/libkshark-configio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel-shark/src/libkshark-configio.c b/kernel-shark/src/libkshark-configio.c index 9106522..cac27a7 100644 --- a/kernel-shark/src/libkshark-configio.c +++ b/kernel-shark/src/libkshark-configio.c @@ -310,7 +310,6 @@ bool kshark_config_doc_get(struct kshark_config_doc *conf, if (!get_jval(conf, key, &tmp->conf_doc)) goto fail; - free(val->conf_doc); val->conf_doc = (char *) json_object_get_string(tmp->conf_doc); free(tmp); -- 2.20.1