summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index aae92d41b1..0584814f73 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -162,7 +162,7 @@ void *CRYPTO_malloc(size_t num, const char *file, int line)
if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
return malloc_impl(num, file, line);
- if (num <= 0)
+ if (num == 0)
return NULL;
FAILTEST();