mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
xmb: Fix a potential memleak
This commit is contained in:
parent
14189c08a2
commit
c5512dbd5b
@ -575,13 +575,13 @@ static void *xmb_init(void)
|
|||||||
menu->userdata = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));
|
menu->userdata = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));
|
||||||
|
|
||||||
if (!menu->userdata)
|
if (!menu->userdata)
|
||||||
|
{
|
||||||
|
free(menu);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
xmb = (xmb_handle_t*)menu->userdata;
|
xmb = (xmb_handle_t*)menu->userdata;
|
||||||
|
|
||||||
if (!xmb)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
xmb->x = 0;
|
xmb->x = 0;
|
||||||
xmb->alpha = 1.0f;
|
xmb->alpha = 1.0f;
|
||||||
xmb->depth = 1;
|
xmb->depth = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user