mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-12 13:51:27 +00:00
overlay: Fix potential memory leak.
This commit is contained in:
parent
bb172a7281
commit
b1f95f85ba
@ -413,10 +413,12 @@ static bool input_overlay_load_overlay(input_overlay_t *ol,
|
||||
overlay_rect, sizeof(overlay_rect)))
|
||||
{
|
||||
struct string_list *list = string_split(overlay_rect, ", ");
|
||||
if (list->size < 4)
|
||||
|
||||
if (!list || list->size < 4)
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to split rect \"%s\" into at least four tokens.\n",
|
||||
overlay_rect);
|
||||
string_list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user