mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 21:28:22 +00:00
translate-all: Prevent null-pointer dereference possibility in tb_clean_internal()
This commit is contained in:
parent
1fe99928c8
commit
103af93402
1 changed files with 2 additions and 2 deletions
|
@ -173,11 +173,11 @@ static void cpu_gen_init(struct uc_struct *uc)
|
|||
|
||||
static void tb_clean_internal(struct uc_struct *uc, int i, void** lp)
|
||||
{
|
||||
if (i == 0 || lp == 0) {
|
||||
if (i == 0 || lp == NULL) {
|
||||
return;
|
||||
}
|
||||
tb_clean_internal(uc, i-1, (void*)(((char*)*lp) + ((0 >> (i * V_L2_BITS)) & (V_L2_SIZE - 1))));
|
||||
if (lp && *lp) {
|
||||
tb_clean_internal(uc, i-1, (void*)(((char*)*lp) + ((0 >> (i * V_L2_BITS)) & (V_L2_SIZE - 1))));
|
||||
g_free(*lp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue