summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 4320a0ad5e..92adc8a890 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -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);