From 65deba3a350f760dacdb170fbecfa07edf4e4711 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 17 Jul 2009 06:13:27 +0000 Subject: Memory could be leaked if a second prompt or message appeared while another was still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual prompt callbacks). Also make both messages and prompts clear any existing when a new is set. In addition, the screen could be modified while the prompt is there, restore the redraw-entire-screen behaviour on prompt clear; add a comment as a reminder. --- cmd-select-prompt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-select-prompt.c') diff --git a/cmd-select-prompt.c b/cmd-select-prompt.c index 8b707342..67bb8ff3 100644 --- a/cmd-select-prompt.c +++ b/cmd-select-prompt.c @@ -55,7 +55,7 @@ cmd_select_prompt_exec(struct cmd *self, struct cmd_ctx *ctx) if (c->prompt_string != NULL) return (0); - status_prompt_set(c, "index ", cmd_select_prompt_callback, c, 0); + status_prompt_set(c, "index ", cmd_select_prompt_callback, NULL, c, 0); return (0); } -- cgit