From e1042e93488f2b38abeea58b65440111df69afdc Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 26 Aug 2013 14:48:22 +0200 Subject: compat: Check return value of mmap() properly https://bugs.freedesktop.org/show_bug.cgi?id=68525 --- common/compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.1