diff --git a/frontend/menu/disp/xmb.c b/frontend/menu/disp/xmb.c index 3fd0334f89..b6e047c6e6 100644 --- a/frontend/menu/disp/xmb.c +++ b/frontend/menu/disp/xmb.c @@ -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;