Commit d46c3aa7 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#6793

parent 697ed05a
...@@ -65,6 +65,7 @@ OpenLDAP 2.4.24 Engineering ...@@ -65,6 +65,7 @@ OpenLDAP 2.4.24 Engineering
Fixed slapd-ldap chaining with onelevel scope (ITS#6699) Fixed slapd-ldap chaining with onelevel scope (ITS#6699)
Fixed slapd-ldap chaining with ppolicy (ITS#6540) Fixed slapd-ldap chaining with ppolicy (ITS#6540)
Fixed slapd-ldap with SASL/EXTERNAL (ITS#6642) Fixed slapd-ldap with SASL/EXTERNAL (ITS#6642)
Fixed slapd-ldap crasher on matchedDN (ITS#6793)
Fixed slapd-ldif error strings (ITS#6731) Fixed slapd-ldif error strings (ITS#6731)
Fixed slapd-ndb to honor rootpw setting (ITS#6661) Fixed slapd-ndb to honor rootpw setting (ITS#6661)
Fixed slapd-ndb hasSubordinates generation (ITS#6712) Fixed slapd-ndb hasSubordinates generation (ITS#6712)
......
...@@ -169,9 +169,7 @@ ldap_back_search( ...@@ -169,9 +169,7 @@ ldap_back_search(
int do_retry = 1, dont_retry = 0; int do_retry = 1, dont_retry = 0;
LDAPControl **ctrls = NULL; LDAPControl **ctrls = NULL;
char **references = NULL; char **references = NULL;
void *matchctx = NULL;
/* FIXME: shouldn't this be null? */
const char *save_matched = rs->sr_matched;
if ( !ldap_back_dobind( &lc, op, rs, LDAP_BACK_SENDERR ) ) { if ( !ldap_back_dobind( &lc, op, rs, LDAP_BACK_SENDERR ) ) {
return rs->sr_err; return rs->sr_err;
...@@ -548,12 +546,11 @@ retry: ...@@ -548,12 +546,11 @@ retry:
struct berval pmatch; struct berval pmatch;
if ( dnPretty( NULL, &match, &pmatch, op->o_tmpmemctx ) == LDAP_SUCCESS ) { if ( dnPretty( NULL, &match, &pmatch, op->o_tmpmemctx ) == LDAP_SUCCESS ) {
rs->sr_matched = pmatch.bv_val;
ber_memfree( match.bv_val ); ber_memfree( match.bv_val );
matchctx = op->o_tmpmemctx;
} else { match.bv_val = pmatch.bv_val;
rs->sr_matched = match.bv_val;
} }
rs->sr_matched = match.bv_val;
} }
if ( rs->sr_v2ref ) { if ( rs->sr_v2ref ) {
...@@ -584,15 +581,10 @@ finish:; ...@@ -584,15 +581,10 @@ finish:;
rs->sr_ctrls = NULL; rs->sr_ctrls = NULL;
} }
if ( rs->sr_matched != NULL && rs->sr_matched != save_matched ) { if ( match.bv_val ) {
if ( rs->sr_matched != match.bv_val ) { ber_memfree_x( match.bv_val, matchctx );
ber_memfree_x( (char *)rs->sr_matched, op->o_tmpmemctx );
} else {
ber_memfree( match.bv_val );
}
rs->sr_matched = save_matched;
} }
rs->sr_matched = NULL;
if ( rs->sr_text ) { if ( rs->sr_text ) {
if ( freetext ) { if ( freetext ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment