From: x2018 Date: Mon, 17 Nov 2025 06:26:24 +0000 (+0800) Subject: openssl: fix a potential memory leak of bio_out X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11c0aaa339fb1c52e3952264b7bad776fe43441f;p=thirdparty%2Fcurl.git openssl: fix a potential memory leak of bio_out Closes #19561 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 9b3ca9b5ea..fd6396471c 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -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; }