about summary refs log tree commit diff
path: root/nss/nss_db/db-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_db/db-open.c')
-rw-r--r--nss/nss_db/db-open.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nss/nss_db/db-open.c b/nss/nss_db/db-open.c
index 8a83d6b930..3fa11e9ab0 100644
--- a/nss/nss_db/db-open.c
+++ b/nss/nss_db/db-open.c
@@ -63,5 +63,9 @@ internal_setent (const char *file, struct nss_db_map *mapping)
 void
 internal_endent (struct nss_db_map *mapping)
 {
-  munmap (mapping->header, mapping->len);
+  if (mapping->header != NULL)
+    {
+      munmap (mapping->header, mapping->len);
+      mapping->header = NULL;
+    }
 }