[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/34] sdhci-test: fix leaks
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 13/34] sdhci-test: fix leaks |
Date: |
Tue, 6 Mar 2018 14:19:09 +0100 |
From: Marc-André Lureau <address@hidden>
Fix the following ASAN reports:
==20125==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x7f0faea03a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
#1 0x7f0fae450f75 in g_malloc0 ../glib/gmem.c:124
#2 0x562fffd526fc in machine_start
/home/elmarco/src/qemu/tests/sdhci-test.c:180
Indirect leak of 152 byte(s) in 1 object(s) allocated from:
#0 0x7f0faea03850 in malloc (/lib64/libasan.so.4+0xde850)
#1 0x7f0fae450f0c in g_malloc ../glib/gmem.c:94
#2 0x562fffd5d21d in qpci_init_pc
/home/elmarco/src/qemu/tests/libqos/pci-pc.c:122
Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/sdhci-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/sdhci-test.c b/tests/sdhci-test.c
index 6b3a532..1d825eb 100644
--- a/tests/sdhci-test.c
+++ b/tests/sdhci-test.c
@@ -209,8 +209,10 @@ static QSDHCI *machine_start(const struct sdhci_t *test)
static void machine_stop(QSDHCI *s)
{
+ qpci_free_pc(s->pci.bus);
g_free(s->pci.dev);
qtest_quit(global_qtest);
+ g_free(s);
}
static void test_machine(const void *data)
--
1.8.3.1
- [Qemu-devel] [PULL 02/34] Remove the deprecated -tdf option, (continued)
- [Qemu-devel] [PULL 02/34] Remove the deprecated -tdf option, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 07/34] Document --rtc-td-hack, --localtime and --startdate as deprecated, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 03/34] scsi: Remove automatic creation of SCSI controllers with -drive if=scsi, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 11/34] lockable: workaround GCC link issue with ASAN, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 10/34] build-sys: fix -fsanitize=address check, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 08/34] qmp: Merge ObjectPropertyInfo and DevicePropertyInfo, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 06/34] cpus: CPU threads are always created initially for one CPU only, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 09/34] qmp: Add qom-list-properties to list QOM object properties, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 13/34] sdhci-test: fix leaks,
Paolo Bonzini <=
- [Qemu-devel] [PULL 14/34] chardev: fix leak in tcp_chr_telnet_init_io(), Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 12/34] ahci-test: fix opts leak of skip tests, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 15/34] openpic_kvm: drop address_space_to_flatview call, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 19/34] address_space_access_valid: address_space_to_flatview needs RCU lock, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 17/34] address_space_write: address_space_to_flatview needs RCU lock, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 22/34] checkpatch: add a warning for basename/dirname, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 18/34] address_space_read: address_space_to_flatview needs RCU lock, Paolo Bonzini, 2018/03/06
- [Qemu-devel] [PULL 16/34] memory: inline some performance-sensitive accessors, Paolo Bonzini, 2018/03/06