All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	richard.henderson@linaro.org
Subject: Re: [PATCH 1/4] tests: fix leaks in dbus-display-test
Date: Fri, 23 Jan 2026 10:21:07 -0300	[thread overview]
Message-ID: <87qzrgihx8.fsf@suse.de> (raw)
In-Reply-To: <20260122113144.2046899-2-marcandre.lureau@redhat.com>

marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Close the connections and complete the method invocations.
>
> Thanks ASAN for the report.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tests/qtest/dbus-display-test.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c
> index 1d5951b7117..5773776cad5 100644
> --- a/tests/qtest/dbus-display-test.c
> +++ b/tests/qtest/dbus-display-test.c
> @@ -76,6 +76,7 @@ test_dbus_display_vm(void)
>          qemu_dbus_display1_vm_get_name(QEMU_DBUS_DISPLAY1_VM(vm)),
>          ==,
>          "dbus-test");
> +    g_clear_object(&conn);
>      qtest_quit(qts);
>  }
>  
> @@ -97,6 +98,8 @@ static gboolean listener_handle_scanout(
>      GVariant *arg_data,
>      TestDBusConsoleRegister *test)
>  {
> +    qemu_dbus_display1_listener_complete_scanout(object, invocation);
> +
>      if (!test->with_map) {
>          g_main_loop_quit(test->loop);
>      }
> @@ -131,6 +134,9 @@ static gboolean listener_handle_scanout_map(
>      g_assert_no_errno(addr == MAP_FAILED ? -1 : 0);
>      g_assert_no_errno(munmap(addr, len));
>  
> +    qemu_dbus_display1_listener_unix_map_complete_scanout_map(object, invocation,
> +                                                              NULL);
> +
>      g_main_loop_quit(test->loop);
>  
>      close(fd);
> @@ -287,6 +293,7 @@ test_dbus_display_console(const void* data)
>  
>      g_clear_object(&test.server);
>      g_clear_object(&test.listener_conn);
> +    g_clear_object(&conn);
>      qtest_quit(qts);
>  }
>  
> @@ -322,6 +329,7 @@ test_dbus_display_keyboard(void)
>          &err);
>      if (g_error_matches(err, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) {
>          g_test_skip("The VM doesn't have a console!");
> +        g_clear_object(&conn);
>          qtest_quit(qts);
>          return;
>      }
> @@ -348,6 +356,7 @@ test_dbus_display_keyboard(void)
>      g_assert_cmpint(qemu_dbus_display1_keyboard_get_modifiers(
>                          QEMU_DBUS_DISPLAY1_KEYBOARD(keyboard)), ==, 0);
>  
> +    g_clear_object(&conn);
>      qtest_quit(qts);
>  }

Acked-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2026-01-23 13:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22 11:31 [PATCH 0/4] ui: fix small leaks in -display dbus marcandre.lureau
2026-01-22 11:31 ` [PATCH 1/4] tests: fix leaks in dbus-display-test marcandre.lureau
2026-01-23 13:21   ` Fabiano Rosas [this message]
2026-01-22 11:31 ` [PATCH 2/4] ui/dbus: fix leak regression marcandre.lureau
2026-03-09 14:22   ` Philippe Mathieu-Daudé
2026-01-22 11:31 ` [PATCH 3/4] ui/dbus: fix Unix.Map proxy leak marcandre.lureau
2026-03-08 13:22   ` Peter Maydell
2026-01-22 11:31 ` [PATCH 4/4] ui/dbus: fix pixman cleanup marcandre.lureau
2026-03-08 13:23   ` Peter Maydell
2026-03-08 13:25 ` [PATCH 0/4] ui: fix small leaks in -display dbus Peter Maydell
2026-03-09 14:21   ` Philippe Mathieu-Daudé
2026-03-09 14:51     ` Peter Maydell
2026-03-09 14:54       ` Philippe Mathieu-Daudé

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=87qzrgihx8.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.