public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] last: fix memory leak
@ 2013-09-08 16:09 Sami Kerola
  2013-09-08 16:09 ` [PATCH 2/4] tools: generate autotools files if missing Sami Kerola
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sami Kerola @ 2013-09-08 16:09 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 login-utils/last.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/login-utils/last.c b/login-utils/last.c
index eb64bde..bc1b4ce 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)
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-10 11:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-08 16:09 [PATCH 1/4] last: fix memory leak Sami Kerola
2013-09-08 16:09 ` [PATCH 2/4] tools: generate autotools files if missing Sami Kerola
2013-09-10 11:13   ` Karel Zak
2013-09-08 16:09 ` [PATCH 3/4] lib/fileutils: advice there is no point caching temporary files Sami Kerola
2013-09-09  3:23   ` Pádraig Brady
2013-09-10  7:11     ` Sami Kerola
2013-09-08 16:09 ` [PATCH 4/4] hexdump: revert global exitval variable change Sami Kerola
2013-09-10 11:14   ` Karel Zak
2013-09-10 11:13 ` [PATCH 1/4] last: fix memory leak Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox