GH1555: Don't bump size on realloc failure

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 6fcace45bd)
This commit is contained in:
Rich Salz 2016-09-09 10:52:59 -04:00
parent 9583e4166d
commit ceb7342dab

View file

@ -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;
}