1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r10213: fixed a memory leak in the ldap client and server code spotted by Karl

Melcher. ldap_encode() now takes a memory context to use for the data
blob
(This used to be commit 09948a5933)
This commit is contained in:
Andrew Tridgell
2005-09-13 22:05:45 +00:00
committed by Gerald (Jerry) Carter
parent 234481fd40
commit a129ad36eb
4 changed files with 9 additions and 10 deletions

View File

@ -87,12 +87,14 @@ static void ldapsrv_process_message(struct ldapsrv_connection *conn,
DATA_BLOB b;
msg = call->replies->msg;
if (!ldap_encode(msg, &b)) {
if (!ldap_encode(msg, &b, call)) {
DEBUG(0,("Failed to encode ldap reply of type %d\n", msg->type));
goto failed;
}
status = data_blob_append(call, &blob, b.data, b.length);
data_blob_free(&b);
if (!NT_STATUS_IS_OK(status)) goto failed;
DLIST_REMOVE(call->replies, call->replies);