summaryrefslogtreecommitdiffstats
path: root/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-17 06:13:27 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-17 06:13:27 +0000
commit65deba3a350f760dacdb170fbecfa07edf4e4711 (patch)
treeaa04b471d50b4cc7417c15f5e88fa588c8eafa2b /server-fn.c
parent9642f0373f94d6015e66806c95ba1570c7bb06ea (diff)
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.
Diffstat (limited to 'server-fn.c')
-rw-r--r--server-fn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server-fn.c b/server-fn.c
index b5cc00f5..4ecb9ce9 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -171,8 +171,8 @@ server_lock(void)
continue;
status_prompt_clear(c);
- status_prompt_set(
- c, "Password: ", server_lock_callback, c, PROMPT_HIDDEN);
+ status_prompt_set(c,
+ "Password: ", server_lock_callback, c, NULL, PROMPT_HIDDEN);
server_redraw_client(c);
}
server_locked = 1;