summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/ldap/ldap_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index e392002a19..bc70cd56aa 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -213,12 +213,12 @@ static void ldap_try_decode_wrapped(struct ldap_connection *conn)
return;
}
- if (ldap_decode(&asn1, msg)) {
+ while (ldap_decode(&asn1, msg)) {
ldap_match_message(conn, msg);
- } else {
- talloc_free(msg);
+ msg = talloc(conn, struct ldap_message);
}
+ talloc_free(msg);
asn1_free(&asn1);
if (conn->partial.length == len + 4) {