aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/lhash/lhash.c
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:40:27 -0400
commit6fcace45bda108ad4d3f95261494dd479720d92c (patch)
treea35c8475bd9d68065fdc2df93cb27767cf5be444 /crypto/lhash/lhash.c
parent4588cb4443552f1d251a637b48f39d891051ee1c (diff)
downloadopenssl-6fcace45bda108ad4d3f95261494dd479720d92c.tar.gz
GH1555: Don't bump size on realloc failure
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/lhash/lhash.c')
-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 19c6d2c31d..adde832cc4 100644
--- 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;
}