summaryrefslogtreecommitdiff
path: root/exec
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-03-11 01:18:30 +0000
committerRoland McGrath <roland@gnu.org>2002-03-11 01:18:30 +0000
commitc979c4a3b0dcd806eaf8730b56faeb9807a7c937 (patch)
tree1eac186aa88b477e8de0bb699a5c9bb14bab5013 /exec
parenteeb0adf8467d10a4326c7caf15385d6e7bad82b8 (diff)
(dump_core): Missing munmap
Diffstat (limited to 'exec')
-rw-r--r--exec/elfcore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/exec/elfcore.c b/exec/elfcore.c
index ddcaebd9..b8ffcbc8 100644
--- a/exec/elfcore.c
+++ b/exec/elfcore.c
@@ -272,6 +272,10 @@ dump_core (task_t task, file_t file, off_t corelimit,
TIME_VALUE_TO_TIMESPEC (&pi->taskinfo.user_time, &note.data.pr_time);
/* XXX struct procinfo should have dead child info for pr_ctime */
note.data.pr_wstat = pi->exitstatus;
+
+ if ((void *) pi != &pibuf)
+ munmap (pi, pi_size);
+
{
/* We have to nab the process's own proc port to get the
proc server to tell us its registered arg locations. */