Commit cd1caea4 authored by Richard Levitte's avatar Richard Levitte
Browse files

BIO: at the end of BIO_new, declare the BIO inited if no create method present



Without this, every BIO implementation is forced to have a create
method, just to set bio->init = 1.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5223)

(cherry picked from commit 7f55808f)
parent 96de98ba
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ BIO *BIO_new(const BIO_METHOD *method)
        CRYPTO_THREAD_lock_free(bio->lock);
        goto err;
    }
    if (method->create == NULL)
        bio->init = 1;

    return bio;