ldap: fix to not leak attribute on OOM (WinLDAP)

Reported-by: Andrew Nesbitt

Closes #21576
This commit is contained in:
Viktor Szakats 2026-05-12 18:19:26 +02:00
parent 54d5de5305
commit eca309c2a1
No known key found for this signature in database

View file

@ -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;
}