ui/ncurses: Use pmenu_item destrutor to free ncurses ITEMs
authorJeremy Kerr <jk@ozlabs.org>
Thu, 13 Mar 2014 02:37:20 +0000 (10:37 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 10 Apr 2014 03:18:25 +0000 (11:18 +0800)
commit37bff93c8b0a71432613f41f2319dc073ca64619
tree54f43ede1083c596a68864a534dd87cc6237ba2d
parent1bbd230d618162ccd5ea97540a413c766a07c0cb
ui/ncurses: Use pmenu_item destrutor to free ncurses ITEMs

Currently, pemnu_destroy is used to free items. This means that the menu
code needs to iterate over items, and we have no way to free the ITEM *
of items that aren't in a menu.

Instead, free the ITEM in the pmenu_item destructor.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-menu.c