qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH] iothread: Set the GSource "name" field
Date: Tue, 5 Sep 2023 18:50:34 +0200	[thread overview]
Message-ID: <ba47753d-2b9f-4ef9-d715-7624a4be5172@linaro.org> (raw)
In-Reply-To: <ZPdNCkLk4icmtxf0@x1n>

On 5/9/23 17:45, Peter Xu wrote:
> On Mon, Sep 04, 2023 at 11:48:11AM -0300, Fabiano Rosas wrote:
>> @@ -189,11 +193,14 @@ static void iothread_init(EventLoopBase *base, Error **errp)
>>           return;
>>       }
>>   
>> +    thread_name = g_strdup_printf("IO %s",
>> +                        object_get_canonical_path_component(OBJECT(base)));
>> +
>>       /*
>>        * Init one GMainContext for the iothread unconditionally, even if
>>        * it's not used
>>        */
>> -    iothread_init_gcontext(iothread);
>> +    iothread_init_gcontext(iothread, thread_name);
>>   
>>       iothread_set_aio_context_params(base, &local_error);
>>       if (local_error) {
> 
> I think thread_name might be leaked if error here.  Thanks,

Oops, good catch. Better switch to g_autofree.


  reply	other threads:[~2023-09-05 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 14:48 [PATCH] iothread: Set the GSource "name" field Fabiano Rosas
2023-09-04 15:57 ` Philippe Mathieu-Daudé
2023-09-05 15:45 ` Peter Xu
2023-09-05 16:50   ` Philippe Mathieu-Daudé [this message]
2023-09-05 17:46     ` Stefan Hajnoczi

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=ba47753d-2b9f-4ef9-d715-7624a4be5172@linaro.org \
    --to=philmd@linaro.org \
    --cc=farosas@suse.de \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).