projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82a15ee
)
Fix memory leak.
author
Paul Eggert
<eggert@cs.ucla.edu>
Tue, 16 Nov 2004 20:44:34 +0000
(20:44 +0000)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Tue, 16 Nov 2004 20:44:34 +0000
(20:44 +0000)
src/pinky.c
patch
|
blob
|
history
src/who.c
patch
|
blob
|
history
diff --git
a/src/pinky.c
b/src/pinky.c
index
2e97fc8
..
6912972
100644
(file)
--- 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
diff --git
a/src/who.c
b/src/who.c
index
714ac28
..
d050dc1
100644
(file)
--- a/
src/who.c
+++ b/
src/who.c
@@
-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
{