diff options
-rw-r--r-- | pw.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -560,6 +560,9 @@ static void sigwinch(int sig) static char **resizebuf(char **buf, size_t nlfrom, size_t nlto) { + if (nlfrom > nlto) + for (size_t i = nlto; i < nlfrom; i++) + dsdrop(buf[i]); if ((buf = realloc(buf, sizeof *buf * nlto)) == 0) panic("out of memory"); if (nlfrom < nlto) |