From eca309c2a1fd60b8bf6b1ca19008ac601e99d40e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 12 May 2026 18:19:26 +0200 Subject: [PATCH] ldap: fix to not leak `attribute` on OOM (WinLDAP) Reported-by: Andrew Nesbitt Closes #21576 --- lib/ldap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ldap.c b/lib/ldap.c index f476da4ea0..0f9e782171 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -474,6 +474,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) #ifdef USE_WIN32_LDAP char *attr = curlx_convert_tchar_to_UTF8(attribute); if(!attr) { + ldap_memfree(attribute); result = CURLE_OUT_OF_MEMORY; goto quit; }