qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] cpu-plug-test: fix leaks


From: Thomas Huth
Subject: Re: [PATCH 3/3] cpu-plug-test: fix leaks
Date: Fri, 8 Nov 2019 11:56:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0

On 07/11/2019 20.27, Marc-André Lureau wrote:
Spotted by ASAN.

Signed-off-by: Marc-André Lureau <address@hidden>
---
  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 <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]