glui: Fix potential memory leak

This commit is contained in:
Lioncash 2014-10-12 00:20:47 -04:00
parent 3440b97b4d
commit de1de54ef6

View File

@ -393,13 +393,12 @@ static void *glui_init(void)
menu->userdata = (glui_handle_t*)calloc(1, sizeof(glui_handle_t));
if (!menu->userdata)
{
free(menu);
return NULL;
}
glui = (glui_handle_t*)menu->userdata;
if (!glui)
return NULL;
glui->bg = 0;
glui_init_core_info(menu);