From 1e99722d020f38eaad7fe2010f43c23586a19410 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jun 2005 09:08:08 +0000 Subject: r7716: a single wrapped ldap blob can contain multiple ldap messages (This used to be commit de5f265b6c586335965a6de844c203206261cc3b) --- source4/libcli/ldap/ldap_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4') 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) { -- cgit