Fix use-after-free

menu_settings_iterate() would strcmp freed labels after exiting
a submenu.
Merge pull request #1117 from mprobinson/use-after-free

Fix use-after-free