Merge pull request #1144 from lioncash/leaks

xmb: Fix a potential memleak
This commit is contained in:
Twinaphex 2014-10-13 23:34:56 +02:00
commit aa0a28f1b2

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;