qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup
Date: Wed, 28 Aug 2019 10:33:54 +0200	[thread overview]
Message-ID: <a2200bb4951f8037de3b9fcb6921fb0ff5210eda.camel@sipsolutions.net> (raw)
In-Reply-To: <CAMxuvaykLW7U5gppHe8Z2zCg6bcGxeVuBMrkKk8Eh9V3oQAY6w@mail.gmail.com>

Hi,

> > +    g_source_unref(src);
> > +    g_source_destroy(src);
> 
> I would call destroy() (detach) before unref().

Fair enough. I think there's an internal reference, but it's probably
safer that way.

> > +    vugg_source_destroy(vi.evsrc);
> 
> typo

Oops. I thought I compiled it, I guess I didn't, fixed.

> >      g_array_free(vi.config, TRUE);
> >      g_free(vi.queue);
> >      return 0;
> 
> vhost-user-input calls g_source_destroy(), please replace it too with
> vug_source_destroy().

That's what the patch above was, apart from the typo :-)

> vhost-user-gpu "renderer_source" leaks, not this patch fault, but
> worth to mention in the commit. 

I did:

>> vhost-user-gpu also uses vug_source_new(), but never seems to free
>> the result at all, so I haven't changed anything there.

> Feel free to add a second commit to fix that too.

I looked at it briefly but couldn't unwind the paths, sorry.

johannes



      reply	other threads:[~2019-08-28  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 12:49 [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup Johannes Berg
2019-08-27 13:43 ` Marc-André Lureau
2019-08-28  8:33   ` Johannes Berg [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=a2200bb4951f8037de3b9fcb6921fb0ff5210eda.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.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).