Fix memory leak in menu.c