summaryrefslogtreecommitdiff
path: root/src/pinky.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-11-16 20:44:34 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-11-16 20:44:34 +0000
commited2fcc6f9aa466b2e026af88fd3bd712e007da25 (patch)
tree52521d79694e201a65cfe36ac5bb716e8ec35599 /src/pinky.c
parent82a15eefa33f77728ab11f545fc95889a184873b (diff)
downloadcoreutils-ed2fcc6f9aa466b2e026af88fd3bd712e007da25.tar.xz
Fix memory leak.
Diffstat (limited to 'src/pinky.c')
-rw-r--r--src/pinky.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pinky.c b/src/pinky.c
index 2e97fc8a6..6912972fc 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -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