From b9c5f6a79df1311ae6eef0ece48e9d2f419007d9 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 25 Mar 2022 00:51:40 +0000 Subject: [PATCH] multiprogress.c: Pair calls to `free' with zeroing the points. --- multiprogress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multiprogress.c b/multiprogress.c index 4254e13..b54325b 100644 --- a/multiprogress.c +++ b/multiprogress.c @@ -144,7 +144,8 @@ void progress_free(struct progress_state *progress) struct progress_ttyinfo *tty = &progress->tty; if (tty->fp) { fclose(tty->fp); tty->fp = 0; } - free(tty->termbuf); free(tty->capbuf); tty->termbuf = tty->capbuf = 0; + free(tty->termbuf); tty->termbuf = 0; + free(tty->capbuf); tty->capbuf = 0; } #if defined(USE_TERMINFO) -- 2.11.0