From 61fc4664296fa289b9f0ceb40b40db6abfe50b72 Mon Sep 17 00:00:00 2001 From: Renge Date: Thu, 3 Mar 2022 22:03:41 -0500 Subject: [PATCH] fix: freelines --- hw2/src/par.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw2/src/par.c b/hw2/src/par.c index 5b9cd2a..2fabdb9 100644 --- a/hw2/src/par.c +++ b/hw2/src/par.c @@ -252,10 +252,10 @@ static void freelines(char **lines) /* Frees the strings pointed to in the NULL-terminated array lines, then */ /* frees the array. Does not use errmsg because it always succeeds. */ { - char *line; + char **line; - for (line = *lines; *line; ++line) - free(line); + for (line = lines; *line; ++line) + free(*line); free(lines); }