Fix a memory leak with last
free memory allocated to 'buf' Submitted by: Thomas Rix <trix@juniper.net> Reviewed by: ed Approved by: sjg (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9850
This commit is contained in:
parent
304b0a16bb
commit
442a984788
@ -243,7 +243,7 @@ wtmp(void)
|
||||
/* Display them in reverse order. */
|
||||
while (amount > 0)
|
||||
doentry(&buf[--amount]);
|
||||
|
||||
free(buf);
|
||||
tm = localtime(&t);
|
||||
(void) strftime(ct, sizeof(ct), "%+", tm);
|
||||
printf("\n%s begins %s\n", ((file == NULL) ? "utx.log" : file), ct);
|
||||
|
Loading…
Reference in New Issue
Block a user