From: Rich Salz Date: Fri, 9 Sep 2016 14:52:59 +0000 (-0400) Subject: GH1555: Don't bump size on realloc failure X-Git-Tag: OpenSSL_1_0_2i~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ceb7342dab3ab0827b3e13dd9a367d31c7bc3f43;p=oweals%2Fopenssl.git GH1555: Don't bump size on realloc failure Reviewed-by: Richard Levitte (cherry picked from commit 6fcace45bda108ad4d3f95261494dd479720d92c) --- 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; }