diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-25 14:31:55 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-26 23:42:18 +0200 |
commit | 9ad43da4ff755b8e48e1b2f51271766061541dac (patch) | |
tree | 1245b6bd55cf2e8093e916ab79ad1cb9e10a7ea2 /libps | |
parent | 6fa2f65fa28c0eebb736108d55b723e1a207c243 (diff) |
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.
Diffstat (limited to 'libps')
-rw-r--r-- | libps/procstat.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |