trace-cmd: Fix double free in tsync_agent_thread()
PATCH 1/1 trace-cmd: Fix double free in tsync_agent_thread()
From: "Steven Rostedt (VMware)" <[email protected]>
tracecmd_tsync_free() already frees the tsync, remove the free of it after that is called.
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- lib/trace-cmd/trace-timesync.c | 1 - 1 file changed, 1 deletion(-)
lib/trace-cmd/trace-timesync.c +0 -1
@@ -887,7 +887,6 @@ static void *tsync_agent_thread(void *data) out:tracecmd_msg_handle_close (tsync->msg_handle);tracecmd_tsync_free (tsync); -free (tsync);close (sd);pthread_exit (0 );
Signature · 1 line
2.29.2
Quoted 15 lines · On Wed, 31 Mar 2021 17:05:03 -0400 Steven Rostedt <[email protected]> wrote:
From: "Steven Rostedt (VMware)" <[email protected]>
tracecmd_tsync_free()already frees the tsync, remove the free of it after that is called.Signed-off-by Steven Rostedt (VMware) <[email protected]>--- lib/trace-cmd/trace-timesync.c | 1 - 1 file changed, 1 deletion(-)lib/trace-cmd/trace-timesync.c +0
-0
lib/trace-cmd/trace-timesync.c static void *tsync_agent_thread(void *data) · line 891
Quoted 6 lines
lib/trace-cmd/trace-timesync.c +0
-1@@ -887,7 +887,6 @@ static void *tsync_agent_thread(void *data) out:tracecmd_msg_handle_close (tsync->msg_handle);tracecmd_tsync_free (tsync); -free (tsync);close (sd);
Debugging this more, this entire ending is wrong. New patch coming.
-- Steve
Quoted 1 line
lib/trace-cmd/trace-timesync.c +0
-0pthread_exit (0 );