From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@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, 09 Jun 2017 17:34:42 +0200 [thread overview]
Message-ID: <87wp8lb2el.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <650896fb-d42b-3ce7-8660-4c1275a5e360@redhat.com> (Eric Blake's message of "Fri, 9 Jun 2017 09:58:37 -0500")
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().
We suck at naming.
> (Hmm - maybe scripts/coccinelle/qobject.cocci should be taught this
> cleanup pattern...)
next prev parent reply other threads:[~2017-06-09 15:34 UTC|newest]
Thread overview: 6+ 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 [this message]
2017-06-09 15:42 ` Eric Blake
2017-07-11 5:27 ` [Qemu-trivial] " Markus Armbruster
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=87wp8lb2el.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=eblake@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.