From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] tests: check-qom-proplist: fix leak
Date: Fri, 9 Jun 2017 10:42:58 -0500 [thread overview]
Message-ID: <88c191e7-612f-4c7d-1594-fc1f73318489@redhat.com> (raw)
In-Reply-To: <87wp8lb2el.fsf@dusky.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
On 06/09/2017 10:34 AM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
>
>> On 06/09/2017 08:33 AM, Marc-André Lureau wrote:
>>> user_creatable_add_opts() returns a reference (the other reference is
>>> for the root parent/child link).
>>>
>>> Leak introduced in commit a1af255f065cc.
>>>
>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> ---
>>> tests/check-qom-proplist.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c
>>> index 8e432e9ab6..a3cd7ab29f 100644
>>> --- a/tests/check-qom-proplist.c
>>> +++ b/tests/check-qom-proplist.c
>>> @@ -428,6 +428,8 @@ static void test_dummy_createcmdl(void)
>>> g_assert(err == NULL);
>>> error_free(err);
>>>
>>> + object_unref(OBJECT(dobj));
>>
>> This should be spelled QDECREF(dobj);
>
> Caution, this is object_unref(), not qobject_decref().
Indeed - now that I re-read it closely, I see that you are right. Oh
well - I didn't waste much time improving the qobject coccinelle script,
even though this patch proposal is unrelated to that one. :)
>
> We suck at naming.
Not the first time.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-06-09 15:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 13:33 [Qemu-devel] [PATCH] tests: check-qom-proplist: fix leak Marc-André Lureau
2017-06-09 14:58 ` Eric Blake
2017-06-09 15:34 ` Markus Armbruster
2017-06-09 15:42 ` Eric Blake [this message]
2017-07-11 5:27 ` Markus Armbruster
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=88c191e7-612f-4c7d-1594-fc1f73318489@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).