Commit 9d82c8cc authored by Niels Möller's avatar Niels Möller
Browse files

(xalloc): xalloc(0) should work also on

systems where malloc(0) returns NULL.

Rev: src/nettle/testsuite/testutils.c:1.25
parent 15366fb2
......@@ -38,7 +38,7 @@ void *
xalloc(size_t size)
void *p = malloc(size);
if (!p)
if (size && !p)
fprintf(stderr, "Virtual memory exhausted.\n");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment