mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +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)))
|
overlay_rect, sizeof(overlay_rect)))
|
||||||
{
|
{
|
||||||
struct string_list *list = string_split(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",
|
RARCH_ERR("[Overlay]: Failed to split rect \"%s\" into at least four tokens.\n",
|
||||||
overlay_rect);
|
overlay_rect);
|
||||||
|
string_list_free(list);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user