From: tb Date: Sat, 6 Feb 2021 06:19:28 +0000 (+0000) Subject: Use message_set() instead of direct assignment to curr_message X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e9b50d6af4617558ab4ff988228e8a0e202db4e1;p=openbsd Use message_set() instead of direct assignment to curr_message to avoid leaking the current help text. from Anindya Mukherjee --- diff --git a/usr.bin/systat/engine.c b/usr.bin/systat/engine.c index 6f035868f45..2a73f25c462 100644 --- a/usr.bin/systat/engine.c +++ b/usr.bin/systat/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.26 2021/01/09 12:49:09 jasper Exp $ */ +/* $OpenBSD: engine.c,v 1.27 2021/02/06 06:19:28 tb Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar * @@ -1139,7 +1139,7 @@ command_set(struct command *cmd, const char *init) cmdbuf[0] = 0; } } - curr_message = NULL; + message_set(NULL); curr_cmd = cmd; need_update = 1; return prev; @@ -1235,7 +1235,7 @@ keyboard(void) if (curr_message != NULL) { if (ch > 0) { - curr_message = NULL; + message_set(NULL); need_update = 1; } }