diff options
-rw-r--r-- | exec/elfcore.c | 4 |
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, ¬e.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. */ |