From: Stef Walter Date: Thu, 12 Sep 2013 20:59:14 +0000 (+0200) Subject: ITS#7695 Fix ldapsearch regression with CLDAP X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c919894779d67280fa26afdd94d99248fc38099;p=openldap ITS#7695 Fix ldapsearch regression with CLDAP Don't try to parse the result of a CLDAP bind request. Since these are faked, no message is actually returned. --- diff --git a/clients/tools/common.c b/clients/tools/common.c index 7d1f15ea0b..9ae6f28db0 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -1620,11 +1620,13 @@ tool_bind( LDAP *ld ) } } - rc = ldap_parse_result( ld, result, &err, &matched, &info, &refs, - &ctrls, 1 ); - if ( rc != LDAP_SUCCESS ) { - tool_perror( "ldap_bind parse result", rc, NULL, matched, info, refs ); - tool_exit( ld, LDAP_LOCAL_ERROR ); + if ( result ) { + rc = ldap_parse_result( ld, result, &err, &matched, &info, &refs, + &ctrls, 1 ); + if ( rc != LDAP_SUCCESS ) { + tool_perror( "ldap_bind parse result", rc, NULL, matched, info, refs ); + tool_exit( ld, LDAP_LOCAL_ERROR ); + } } #ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST