summaryrefslogtreecommitdiff
path: root/usr.bin/pmdb/core.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-08-01 15:44:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-08-01 15:44:38 +0000
commit11bcba3dc4be6b77a26d49b86374d36c11fad60d (patch)
treec915c603b23df185b61b68faf59a99f6f7a511c8 /usr.bin/pmdb/core.c
parent7b212f6283479a8166e846f1b6b7af9172f03967 (diff)
in (unused function) free_core(), unmap the core; from veins@evilkittens.org
Diffstat (limited to 'usr.bin/pmdb/core.c')
-rw-r--r--usr.bin/pmdb/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/pmdb/core.c b/usr.bin/pmdb/core.c
index 4db57a26552..45d9b76e25d 100644
--- a/usr.bin/pmdb/core.c
+++ b/usr.bin/pmdb/core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: core.c,v 1.7 2007/08/01 15:43:56 deraadt Exp $ */
+/* $OpenBSD: core.c,v 1.8 2007/08/01 15:44:37 deraadt Exp $ */
/*
* Copyright (c) 2002 Jean-Francois Brousseau <krapht@secureops.com>
* All rights reserved.
@@ -128,6 +128,12 @@ free_core(struct pstate *ps)
free(cf->segs);
cf->segs = NULL;
}
+
+ if (cf->chdr != NULL) {
+ munmap(cf->chdr, cf->cfstat.st_size);
+ cf->chdr = NULL;
+ }
+
}
void