fix memory allocation and reference counting issues
[openssl.git] / crypto / bio / bio_lib.c
index 209b74730eb4322c39a19054084c987efa559eb6..c0dfc6cc44c1ad6f447d2ff47b44917b2665ad12 100644 (file)
@@ -98,7 +98,6 @@ BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method)
     if (method->create != NULL && !method->create(bio)) {
         ERR_raise(ERR_LIB_BIO, ERR_R_INIT_FAIL);
         CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
-        CRYPTO_FREE_REF(&bio->references);
         goto err;
     }
     if (method->create == NULL)