提交 7f55808f 编写于 作者: R Richard Levitte

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: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5223)
上级 2e230e86
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册