linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH] trace-cmd: Fix double free in tsync_agent_thread()
Date: Wed, 31 Mar 2021 17:48:26 -0400	[thread overview]
Message-ID: <20210331174826.346a7077@gandalf.local.home> (raw)
In-Reply-To: <20210331170503.3a9934f5@gandalf.local.home>

On Wed, 31 Mar 2021 17:05:03 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> tracecmd_tsync_free() already frees the tsync, remove the free of it after
> that is called.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>  lib/trace-cmd/trace-timesync.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/lib/trace-cmd/trace-timesync.c b/lib/trace-cmd/trace-timesync.c
> index e860c335..ad73f08f 100644
> --- a/lib/trace-cmd/trace-timesync.c
> +++ b/lib/trace-cmd/trace-timesync.c
> @@ -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

>  	pthread_exit(0);


      reply	other threads:[~2021-03-31 21:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 21:05 [PATCH] trace-cmd: Fix double free in tsync_agent_thread() Steven Rostedt
2021-03-31 21:48 ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210331174826.346a7077@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).