← Commit list

d35bdfa8f2

Daniel Stenberg
Daniel Stenberg
2025-10-09
SUCCESS Duration: 204s

Subject

openldap: fix memory-leak in error path

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/openldap.c+1 -1
@@ -1216,7 +1216,6 @@ static CURLcode oldap_recv(struct Curl_easy *data, int sockindex, char *buf,
break;
}
- ber_free(ber, 0);
if(!result)
result = client_write(data, STRCONST("\n"), NULL, 0, NULL, 0);
@@ -1225,6 +1224,7 @@ static CURLcode oldap_recv(struct Curl_easy *data, int sockindex, char *buf,
break;
}
+ ber_free(ber, 0);
ldap_msgfree(msg);
return result;
}