target/ppc: use g_free() in test_opcode_table()

table[i] is allocated in create_new_table() using g_new().

Use g_free(table[i]) instead of free(table[i]) to comply with QEMU low
level memory management guidelines.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
[Mjt: minor commit comment tweak]
This commit is contained in:
Daniel Henrique Barboza 2023-07-28 16:56:46 -03:00 committed by Michael Tokarev
parent 44adcaacc8
commit 95eac43cb5

View file

@ -7158,7 +7158,7 @@ static int test_opcode_table(opc_handler_t **table, int len)
tmp = test_opcode_table(ind_table(table[i]),
PPC_CPU_INDIRECT_OPCODES_LEN);
if (tmp == 0) {
free(table[i]);
g_free(table[i]);
table[i] = &invalid_handler;
} else {
count++;