projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
GH1555: Don't bump size on realloc failure
[oweals/openssl.git]
/
crypto
/
lhash
/
lhash.c
diff --git
a/crypto/lhash/lhash.c
b/crypto/lhash/lhash.c
index 19c6d2c31d5e0734063efaa619d3ec0ca2b4f284..adde832cc45c637016064aaabb00c392e2b6abe8 100644
(file)
--- a/
crypto/lhash/lhash.c
+++ b/
crypto/lhash/lhash.c
@@
-213,8
+213,8
@@
static int expand(OPENSSL_LHASH *lh)
j = (int)lh->num_alloc_nodes * 2;
n = OPENSSL_realloc(lh->b, (int)(sizeof(OPENSSL_LH_NODE *) * j));
if (n == NULL) {
- /* fputs("realloc error in lhash",stderr); */
lh->error++;
+ lh->num_nodes--;
lh->p = 0;
return 0;
}