summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/pmdb/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/pmdb/core.c b/usr.bin/pmdb/core.c
index 7425fe748d4..4db57a26552 100644
--- a/usr.bin/pmdb/core.c
+++ b/usr.bin/pmdb/core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: core.c,v 1.6 2003/08/17 23:43:45 mickey Exp $ */
+/* $OpenBSD: core.c,v 1.7 2007/08/01 15:43:56 deraadt Exp $ */
/*
* Copyright (c) 2002 Jean-Francois Brousseau <krapht@secureops.com>
* All rights reserved.
@@ -66,6 +66,7 @@ read_core(const char *path, struct pstate *ps)
cfd, 0);
if (core_map == MAP_FAILED)
err(1, "mmap() failed on core");
+ close(cfd);
cf->chdr = (struct core *)core_map;
c_off = cf->chdr->c_hdrsize;