From 9ad43da4ff755b8e48e1b2f51271766061541dac Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Wed, 25 Aug 2010 14:31:55 +0200 Subject: libps: Fix deadly typo PSTAT_PROCINFO is a set of flags, some of which can be obtained in alternative ways. In this case, _proc_stat_free will try to deallocate an uninitialised field. PSTAT_PROC_INFO is the flag we want. * libps/procstat.c (_proc_stat_free): Use PSTAT_PROC_INFO instead of PSTAT_PROCINFO. --- libps/procstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libps') diff --git a/libps/procstat.c b/libps/procstat.c index e8eeb668..33a01cc1 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -1050,7 +1050,7 @@ _proc_stat_free (ps) MFREEPORT (PSTAT_AUTH, auth); /* free any allocated memory pointed to by PS */ - MFREEMEM (PSTAT_PROCINFO, proc_info, ps->proc_info_size, + MFREEMEM (PSTAT_PROC_INFO, proc_info, ps->proc_info_size, ps->proc_info_vm_alloced, 0, char); MFREEMEM (PSTAT_THREAD_BASIC, thread_basic_info, 0, 0, 0, 0); MFREEMEM (PSTAT_THREAD_SCHED, thread_sched_info, 0, 0, 0, 0); -- cgit v1.2.3