diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 1914f906..e522e0ae 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.230 2017/09/11 18:32:31 otto Exp $ */ +/* $OpenBSD: malloc.c,v 1.231 2017/09/12 18:36:30 otto Exp $ */ /* * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek * Copyright (c) 2012 Matthew Dempsky @@ -2000,7 +2000,7 @@ omemalign(struct dir_info *pool, size_t alignment, size_t sz, int zero_fill, psz = PAGEROUND(sz); p = mapalign(pool, alignment, psz, zero_fill); - if (p == NULL) { + if (p == MAP_FAILED) { errno = ENOMEM; return NULL; }