openssl: fix a potential memory leak of bio_out

Closes #19561
This commit is contained in:
x2018 2025-11-17 14:26:24 +08:00 committed by Daniel Stenberg
parent 22b8a6430d
commit 11c0aaa339
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1625,8 +1625,8 @@ static CURLcode x509_name_oneline(X509_NAME *a, struct dynbuf *d)
if(rc != -1) {
BIO_get_mem_ptr(bio_out, &biomem);
result = curlx_dyn_addn(d, biomem->data, biomem->length);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
return result;
}