multiprogress.c: Pair calls to `free' with zeroing the points.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 00:51:40 +0000 (00:51 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 18:51:47 +0000 (18:51 +0000)
multiprogress.c

index 4254e13..b54325b 100644 (file)
@@ -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)