aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2023-07-28 16:56:45 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2023-09-08 13:08:52 +0300
commit44adcaacc877821729ab6d17ea826e1d6ce4bad6 (patch)
tree79954123b49e7121d72b10545cced1d69ad6a5e4 /hw/ppc
parentded625e7aa6a7f3173a22657f7dc0e9ab3d8fa3b (diff)
downloadqemu-44adcaacc877821729ab6d17ea826e1d6ce4bad6.zip
qemu-44adcaacc877821729ab6d17ea826e1d6ce4bad6.tar.gz
qemu-44adcaacc877821729ab6d17ea826e1d6ce4bad6.tar.bz2
hw/ppc: use g_free() in spapr_tce_table_post_load()
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]
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 63e34d4..5e3973f 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;
}