diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-07-14 22:17:17 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-07-14 22:17:17 +0000 |
commit | e70b5a78d5d1ed659db35edc2145e8e5b59558f8 (patch) | |
tree | e722af0e168cd5932a0ee7769204fad9cf60e283 | |
parent | ae65d18896f3ac50f2423ac1d3b97eeb9d4ffcbd (diff) |
Don't bother freeing memory just before exiting.
Suggested by & ok bluhm@
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index a70a777288c..66763ff9604 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.103 2017/07/14 20:51:17 jca Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.104 2017/07/14 22:17:16 jca Exp $ */ /* * Copyright (c) 1999, 2002, 2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -263,11 +263,10 @@ main(int argc, char **argv) sleep(5); /* Step 4, compress the log.0 file if configured to do so and free */ - TAILQ_FOREACH_SAFE(p, &runlist, next, tmp) { + TAILQ_FOREACH(p, &runlist, next) { if ((p->flags & CE_COMPACT) && (p->flags & CE_ROTATED) && p->numlogs > 0) compress_log(p); - free(p); } /* Wait for children to finish, then exit */ |