Commit 7f55808f 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)
parent 2e230e86
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,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;