do not free 'getpwuid' result (thanks to Petr Uzel)
This commit is contained in:
4
cui.cpp
4
cui.cpp
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user