All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 3/3] cpu-plug-test: fix leaks
Date: Fri, 8 Nov 2019 11:56:28 +0100	[thread overview]
Message-ID: <50882b6f-8270-2bb9-18f2-4a9ec49facaa@redhat.com> (raw)
In-Reply-To: <20191107192731.17330-4-marcandre.lureau@redhat.com>

On 07/11/2019 20.27, Marc-André Lureau wrote:
> Spotted by ASAN.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   tests/cpu-plug-test.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c
> index 058cef5ac1..30e514bbfb 100644
> --- a/tests/cpu-plug-test.c
> +++ b/tests/cpu-plug-test.c
> @@ -99,6 +99,7 @@ static void test_plug_with_device_add(gconstpointer data)
>   
>           cpu = qobject_to(QDict, e);
>           if (qdict_haskey(cpu, "qom-path")) {
> +            qobject_unref(e);
>               continue;
>           }
>   
> @@ -107,6 +108,7 @@ static void test_plug_with_device_add(gconstpointer data)
>   
>           qtest_qmp_device_add_qdict(qts, td->device_model, props);
>           hotplugged++;
> +        qobject_unref(e);
>       }
>   
>       /* make sure that there were hotplugged CPUs */
> 

Fixes: 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines")

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2019-11-08 10:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 19:27 [PATCH 0/3] Some memory leak fixes Marc-André Lureau
2019-11-07 19:27 ` [PATCH 1/3] virtio-input: fix memory leak on unrealize Marc-André Lureau
2019-11-08  9:53   ` Michael S. Tsirkin
2019-11-07 19:27 ` [PATCH 2/3] qtest: fix qtest_qmp_device_add leak Marc-André Lureau
2019-11-07 20:31   ` Laurent Vivier
2019-11-07 20:41     ` Marc-André Lureau
2019-11-08  9:54   ` Thomas Huth
2019-11-07 19:27 ` [PATCH 3/3] cpu-plug-test: fix leaks Marc-André Lureau
2019-11-08 10:56   ` Thomas Huth [this message]
2019-11-07 21:57 ` [PATCH 0/3] Some memory leak fixes no-reply
2019-11-08  9:57   ` Thomas Huth
2019-11-08 10:17     ` Laurent Vivier
2019-11-08  9:53 ` Michael S. Tsirkin
2019-11-20 14:50   ` Marc-André Lureau
2019-11-20 14:59     ` Michael S. Tsirkin

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=50882b6f-8270-2bb9-18f2-4a9ec49facaa@redhat.com \
    --to=thuth@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@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 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.