Commit bf0404fe authored by Rich Salz's avatar Rich Salz
Browse files

GH1555: Don't bump size on realloc failure



Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(cherry picked from commit 6fcace45)
parent 64d1cc09
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
        }