mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
Prevent null pointer dereference
This commit is contained in:
parent
4db42db980
commit
693a9660f3
@ -422,6 +422,10 @@ static void content_flush_save_blocks(struct sram_block **blocks,
|
||||
for (i = 0; i < num_blocks; i++)
|
||||
{
|
||||
struct sram_block *block = (struct sram_block*)&blocks[i];
|
||||
|
||||
if (!block || !block->data)
|
||||
continue;
|
||||
|
||||
free(block->data);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user