mirror of
https://github.com/qemu/qemu.git
synced 2025-01-19 03:53:28 +08:00
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:
parent
44adcaacc8
commit
95eac43cb5
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user