mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 01:35:30 +00:00
translate-all: Prevent null-pointer dereference possibility in tb_clean_internal()
This commit is contained in:
parent
f476e4b598
commit
1a1a187292
|
@ -174,11 +174,11 @@ static void cpu_gen_init(struct uc_struct *uc)
|
||||||
|
|
||||||
static void tb_clean_internal(struct uc_struct *uc, int i, void** lp)
|
static void tb_clean_internal(struct uc_struct *uc, int i, void** lp)
|
||||||
{
|
{
|
||||||
if (i == 0 || lp == 0) {
|
if (i == 0 || lp == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tb_clean_internal(uc, i-1, (void*)(((char*)*lp) + ((0 >> (i * V_L2_BITS)) & (V_L2_SIZE - 1))));
|
|
||||||
if (lp && *lp) {
|
if (lp && *lp) {
|
||||||
|
tb_clean_internal(uc, i-1, (void*)(((char*)*lp) + ((0 >> (i * V_L2_BITS)) & (V_L2_SIZE - 1))));
|
||||||
g_free(*lp);
|
g_free(*lp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue