Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
27889a95
Commit
27889a95
authored
Feb 11, 2003
by
Niels Möller
Browse files
(nettle_xrealloc): Fixed out-of-memory check.
Rev: src/nettle/realloc.c:1.2
parent
766de8e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
realloc.c
View file @
27889a95
...
...
@@ -41,9 +41,10 @@ void *
nettle_xrealloc
(
void
*
ctx
UNUSED
,
void
*
p
,
unsigned
length
)
{
void
*
n
=
realloc
(
p
,
length
);
if
(
n
)
return
n
;
fprintf
(
stderr
,
"Virtual memory exhausted.
\n
"
);
abort
();
if
(
length
&&
!
n
)
{
fprintf
(
stderr
,
"Virtual memory exhausted.
\n
"
);
abort
();
}
return
n
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment