summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/mem_sec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index e28a43e295..ddc0a370e6 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -514,7 +514,7 @@ static void sh_done(void)
OPENSSL_free(sh.freelist);
OPENSSL_free(sh.bittable);
OPENSSL_free(sh.bitmalloc);
- if (sh.map_result != NULL && sh.map_size)
+ if (sh.map_result != MAP_FAILED && sh.map_size)
munmap(sh.map_result, sh.map_size);
memset(&sh, 0, sizeof(sh));
}