From: John Snow <jsnow@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test
Date: Tue, 13 Nov 2018 19:56:18 -0500 [thread overview]
Message-ID: <d7308f9e-e68c-ea92-566a-1471ce9848e2@redhat.com> (raw)
In-Reply-To: <1542121904-17330-1-git-send-email-thuth@redhat.com>
On 11/13/18 10:11 AM, Thomas Huth wrote:
> Once a test has finished, the pcibus structure should be freed, to
> avoid leaking memory and to make sure that the structure is properly
> re-initialized when the next test starts.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/ide-test.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index 33cef61..f0280e6 100644
> --- a/tests/ide-test.c
> +++ b/tests/ide-test.c
> @@ -142,6 +142,10 @@ static void ide_test_start(const char *cmdline_fmt, ...)
>
> static void ide_test_quit(void)
> {
> + if (pcibus) {
> + qpci_free_pc(pcibus);
> + pcibus = NULL;
> + }
> pc_alloc_uninit(guest_malloc);
> guest_malloc = NULL;
> qtest_end();
>
Reviewed-by: John Snow <jsnow@redhat.com>
Thanks; I have nothing else queued at the moment, someone else can take
this for now if convenient -- or if I'm being too lazy, let me know and
I'll stage this.
Thanks.
next prev parent reply other threads:[~2018-11-14 0:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 19:08 [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests Thomas Huth
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 1/7] tests/pvpanic: Make the pvpanic test independent of global_qtest Thomas Huth
2018-11-13 0:47 ` Eric Blake
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 2/7] tests/libqos/pci: Make PCI access functions " Thomas Huth
2018-11-12 19:33 ` Paolo Bonzini
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 3/7] ahci-test: Drop dependence on global_qtest Thomas Huth
2018-11-14 0:10 ` John Snow
2018-11-27 14:55 ` Eric Blake
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 4/7] ivshmem-test: " Thomas Huth
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 5/7] tests/acpi-utils: " Thomas Huth
2018-11-27 14:30 ` Igor Mammedov
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 6/7] tests/vmgenid: Make test independent of global_qtest Thomas Huth
2018-11-27 14:38 ` Igor Mammedov
2018-11-12 19:08 ` [Qemu-devel] [PATCH for-3.2 7/7] tests/boot-serial: Get rid of global_qtest variable Thomas Huth
2018-11-13 11:38 ` [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests no-reply
2018-11-13 12:31 ` Thomas Huth
2018-11-13 13:36 ` Laurent Vivier
2018-11-13 14:28 ` Thomas Huth
2018-11-13 15:11 ` [Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test Thomas Huth
2018-11-13 15:54 ` Eric Blake
2018-11-13 16:34 ` Philippe Mathieu-Daudé
2018-11-14 0:56 ` John Snow [this message]
2018-11-14 13:05 ` [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests no-reply
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=d7308f9e-e68c-ea92-566a-1471ce9848e2@redhat.com \
--to=jsnow@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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).