Skip to content
Snippets Groups Projects
Commit 4dc68a7d 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 ba2cda3a
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ void *
xalloc(size_t size)
{
void *p = malloc(size);
if (!p)
if (size && !p)
{
fprintf(stderr, "Virtual memory exhausted.\n");
abort();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment