[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd clean
From: |
Johannes Berg |
Subject: |
Re: [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup |
Date: |
Wed, 28 Aug 2019 10:33:54 +0200 |
User-agent: |
Evolution 3.30.5 (3.30.5-1.fc29) |
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