do not free 'getpwuid' result (thanks to Petr Uzel)

This commit is contained in:
Arnout Engelen
2008-12-31 15:44:32 +00:00
parent 22a28e973e
commit 8b7a51c57d

View File

@@ -412,7 +412,9 @@ void do_refresh()
{ {
struct passwd * pwuid = getpwuid(uid); struct passwd * pwuid = getpwuid(uid);
assert (pwuid != NULL); assert (pwuid != NULL);
free (pwuid); // value returned by pwuid should not be freed, according to
// Petr Uzel.
//free (pwuid);
assert (curproc->getVal()->pid >= 0); assert (curproc->getVal()->pid >= 0);
assert (n < nproc); assert (n < nproc);
} }