summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-09-09 10:52:59 -0400
committerRich Salz <rsalz@openssl.org>2016-09-21 10:42:10 -0400
commitceb7342dab3ab0827b3e13dd9a367d31c7bc3f43 (patch)
treea29ace6894b9497715696ca46c69c8b74b88b7fc /crypto
parent9583e4166d02e160873daaaceb2f8dfe62e49659 (diff)
GH1555: Don't bump size on realloc failure
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 6fcace45bda108ad4d3f95261494dd479720d92c)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/lhash/lhash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c
index 53c5c138bb..f20353aea3 100644
--- a/crypto/lhash/lhash.c
+++ b/crypto/lhash/lhash.c
@@ -335,8 +335,8 @@ static void expand(_LHASH *lh)
n = (LHASH_NODE **)OPENSSL_realloc(lh->b,
(int)(sizeof(LHASH_NODE *) * j));
if (n == NULL) {
-/* fputs("realloc error in lhash",stderr); */
lh->error++;
+ lh->num_nodes--;
lh->p = 0;
return;
}