summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/compat.c b/common/compat.c
index e7bee3c..d813236 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -206,7 +206,7 @@ p11_mmap_open (const char *path,
map->size = sb.st_size;
map->data = mmap (NULL, map->size, PROT_READ, MAP_PRIVATE, map->fd, 0);
- if (data == NULL) {
+ if (map->data == NULL) {
close (map->fd);
free (map);
return NULL;