mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-10 21:10:15 +00:00
input_overlay_free_overlay - prevent 'free' on not malloced pointer
This commit is contained in:
parent
17024c4056
commit
396b08513a
@ -286,8 +286,12 @@ static void input_overlay_free_overlay(struct overlay *overlay)
|
||||
for (i = 0; i < overlay->size; i++)
|
||||
texture_image_free(&overlay->descs[i].image);
|
||||
|
||||
free(overlay->load_images);
|
||||
free(overlay->descs);
|
||||
if (overlay->load_images)
|
||||
free(overlay->load_images);
|
||||
overlay->load_images = NULL;
|
||||
if (overlay->descs)
|
||||
free(overlay->descs);
|
||||
overlay->descs = NULL;
|
||||
texture_image_free(&overlay->image);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user