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]
This commit is contained in:
Daniel Henrique Barboza 2023-07-28 16:56:45 -03:00 committed by Michael Tokarev
parent ded625e7aa
commit 44adcaacc8

View file

@ -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;
}