]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/bind.c
fix compilation when the chaining control is undefined
[openldap] / servers / slapd / back-ldap / bind.c
index 266136dc3f4a413059689abf97875ecb5aa82e80..6d7899e44dde4efe40c57c67cd7012e1cecc03ac 100644 (file)
@@ -866,6 +866,16 @@ retry:;
                default:
                        rc = ldap_parse_result( lc->lc_ld, res, &rs->sr_err,
                                        &match, &text, NULL, NULL, 1 );
+#ifndef LDAP_NULL_IS_NULL
+                       if ( match != NULL && match[ 0 ] == '\0' ) {
+                               ldap_memfree( match );
+                               match = NULL;
+                       }
+                       if ( text != NULL && text[ 0 ] == '\0' ) {
+                               ldap_memfree( text );
+                               text = NULL;
+                       }
+#endif /* LDAP_NULL_IS_NULL */
                        rs->sr_text = text;
                        if ( rc != LDAP_SUCCESS ) {
                                rs->sr_err = rc;