]> git.cameronkatri.com Git - bsdgames-darwin.git/commit
Clarify how one is supposed to use the pointers returned by getutentries()
authordholland <dholland@NetBSD.org>
Sun, 13 Jul 2008 20:07:48 +0000 (20:07 +0000)
committerdholland <dholland@NetBSD.org>
Sun, 13 Jul 2008 20:07:48 +0000 (20:07 +0000)
commitee6e757230838de21b94218e463f2d43979e3aa9
tree714e712b55413d68f61714386c434219435b7c4c
parentd149b63903bb1ba899975d53b8a1a522a91c9921
Clarify how one is supposed to use the pointers returned by getutentries()
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.

Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.

Fixes PR bin/35131, which was about talkd's memory leak.
dm/dm.c