xmb: Fix a potential memleak

This commit is contained in:
Lioncash 2014-10-13 17:30:39 -04:00
parent 14189c08a2
commit c5512dbd5b

View File

@ -575,13 +575,13 @@ static void *xmb_init(void)
menu->userdata = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));
if (!menu->userdata)
{
free(menu);
return NULL;
}
xmb = (xmb_handle_t*)menu->userdata;
if (!xmb)
return NULL;
xmb->x = 0;
xmb->alpha = 1.0f;
xmb->depth = 1;