From: Nick Hainke <vinc...@systemli.org> char* tmp is used in the fprintf function altough it is already freed.
Fixes: e5b38fd1 ("trace: free memory allocated by blobmsg_format_json_indent()") Signed-off-by: Nick Hainke <vinc...@systemli.org> --- trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace/trace.c b/trace/trace.c index 87a98a6..40cf3df 100644 --- a/trace/trace.c +++ b/trace/trace.c @@ -166,8 +166,8 @@ static void print_syscalls(int policy, const char *json) if (!tmp) return; - free(tmp); fprintf(fp, "%s\n", tmp); + free(tmp); fclose(fp); ULOG_INFO("saving syscall trace to %s\n", json); } else { -- 2.33.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel