]> git.ozlabs.org Git - petitboot/commitdiff
ui/ncurses: Don't free item in pmenu_item_setup
authorJeremy Kerr <jk@ozlabs.org>
Wed, 12 Mar 2014 06:22:47 +0000 (14:22 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 8 Apr 2014 08:00:38 +0000 (16:00 +0800)
Currently pmenu_item_setup may free its item parameter on error.

This makes it non-obvious whether the item is still allocated on exit to
the caller.

Instead, this change removes the talloc_free, and requires that the
caller do this on error. This makes the potential use-after-free in
cui_boot_editor_on_exit obvious, so we fix that too.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

No differences found