summaryrefslogtreecommitdiffstats
path: root/src/extent_mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/extent_mmap.c')
-rw-r--r--src/extent_mmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/extent_mmap.c b/src/extent_mmap.c
index b186275..be09937 100644
--- a/src/extent_mmap.c
+++ b/src/extent_mmap.c
@@ -15,7 +15,9 @@ extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero,
return NULL;
}
assert(ret != NULL);
- *zero = true;
+ if (*commit) {
+ *zero = true;
+ }
return ret;
}