From 8b7a51c57d169044dc8b241bbd529e918b6dcad7 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Wed, 31 Dec 2008 15:44:32 +0000 Subject: [PATCH] do not free 'getpwuid' result (thanks to Petr Uzel) --- cui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cui.cpp b/cui.cpp index 2ce5916..12470d1 100644 --- a/cui.cpp +++ b/cui.cpp @@ -412,7 +412,9 @@ void do_refresh() { struct passwd * pwuid = getpwuid(uid); 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 (n < nproc); }