diff options
-rw-r--r-- | login-utils/last.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/login-utils/last.c b/login-utils/last.c index eb64bde6a..bc1b4ce0d 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -819,6 +819,10 @@ static void process_wtmp_file(const struct last_control *ctl) printf(_("\n%s begins %s"), basename(ctl->altv[ctl->alti]), ctime(&begintime)); fclose(fp); + for (p = utmplist; p; p = next) { + next = p->next; + free(p); + } } int main(int argc, char **argv) |