Commit 27889a95 authored by Niels Möller's avatar Niels Möller
Browse files

(nettle_xrealloc): Fixed out-of-memory check.

Rev: src/nettle/realloc.c:1.2
parent 766de8e4
......@@ -41,9 +41,10 @@ void *
nettle_xrealloc(void *ctx UNUSED, void *p, unsigned length)
void *n = realloc(p, length);
if (n)
return n;
if (length && !n)
fprintf(stderr, "Virtual memory exhausted.\n");
return 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