[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/23] hw/ppc: use g_free() in spapr_tce_table_post_load()
From: |
Michael Tokarev |
Subject: |
[PULL 19/23] hw/ppc: use g_free() in spapr_tce_table_post_load() |
Date: |
Fri, 8 Sep 2023 12:55:16 +0300 |
From: Daniel Henrique Barboza <danielhb413@gmail.com>
tcet->mig_table is copied from tcet->table, which in turn is created
in spapr_tce_alloc_table() using g_new0().
Use g_free() instead of free() to deallocate it.
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
[Mjt: fix commit comments]
---
hw/ppc/spapr_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 63e34d457a..5e3973fc5f 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -248,7 +248,7 @@ static int spapr_tce_table_post_load(void *opaque, int
version_id)
memcpy(tcet->table, tcet->mig_table,
tcet->nb_table * sizeof(tcet->table[0]));
- free(tcet->mig_table);
+ g_free(tcet->mig_table);
tcet->mig_table = NULL;
}
--
2.39.2
- [PULL 09/23] tests/: spelling fixes, (continued)
- [PULL 09/23] tests/: spelling fixes, Michael Tokarev, 2023/09/08
- [PULL 10/23] qga/: spelling fixes, Michael Tokarev, 2023/09/08
- [PULL 11/23] misc/other: spelling fixes, Michael Tokarev, 2023/09/08
- [PULL 12/23] block: spelling fixes, Michael Tokarev, 2023/09/08
- [PULL 13/23] hw/display/xlnx_dp: update comments, Michael Tokarev, 2023/09/08
- [PULL 14/23] qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options, Michael Tokarev, 2023/09/08
- [PULL 15/23] docs tests: Fix use of migrate_set_parameter, Michael Tokarev, 2023/09/08
- [PULL 16/23] tests/qtest/test-hmp: Fix migrate_set_parameter xbzrle-cache-size test, Michael Tokarev, 2023/09/08
- [PULL 17/23] accel/tcg: Fix typo in translator_io_start() description, Michael Tokarev, 2023/09/08
- [PULL 18/23] trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value, Michael Tokarev, 2023/09/08
- [PULL 19/23] hw/ppc: use g_free() in spapr_tce_table_post_load(),
Michael Tokarev <=
- [PULL 21/23] tests/qtest/usb-hcd: Remove the empty "init" tests, Michael Tokarev, 2023/09/08
- [PULL 20/23] target/ppc: use g_free() in test_opcode_table(), Michael Tokarev, 2023/09/08
- [PULL 22/23] hw/net/vmxnet3: Fix guest-triggerable assert(), Michael Tokarev, 2023/09/08
- [PULL 23/23] qxl: don't assert() if device isn't yet initialized, Michael Tokarev, 2023/09/08