mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue