Fix memory leak.

This commit is contained in:
Paul Eggert
2004-11-16 20:44:34 +00:00
parent 82a15eefa3
commit ed2fcc6f9a
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -310,6 +310,9 @@ print_entry (const STRUCT_UTMP *utmp_ent)
printf (" %s:%s", host, display);
else
printf (" %s", host);
if (host != ut_host)
free (host);
}
#endif
+3
View File
@@ -421,6 +421,9 @@ print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)
}
sprintf (hoststr, "(%s)", host);
}
if (host != ut_host)
free (host);
}
else
{