(Menu/iOS) Cleanups

This commit is contained in:
twinaphex 2015-02-02 19:03:56 +01:00
parent d7fd935049
commit 6f78669cdc

View File

@ -62,16 +62,19 @@ static void *ios_init(void)
{
menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu));
if (!menu)
return NULL;
goto error;
menu->userdata = (ios_handle_t*)calloc(1, sizeof(ios_handle_t));
if (!menu->userdata)
{
free(menu);
return NULL;
}
goto error;
return menu;
error:
if (menu->userdata)
free(menu->userdata);
if (menu)
free(menu);
return NULL;
}
static void ios_free(void *data)
@ -84,7 +87,6 @@ static void ios_free(void *data)
free(menu->userdata);
free(menu);
return;
}