From: Howard Chu Date: Mon, 7 Apr 2003 10:31:32 +0000 (+0000) Subject: Actually free mapped attrval X-Git-Tag: AUTOCONF_2_57~24 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df05038f9e7a5c3844259b67a3072d3a1467c8ca;p=openldap Actually free mapped attrval --- diff --git a/servers/slapd/back-ldap/compare.c b/servers/slapd/back-ldap/compare.c index 966b9188c7..3d8230386d 100644 --- a/servers/slapd/back-ldap/compare.c +++ b/servers/slapd/back-ldap/compare.c @@ -100,6 +100,8 @@ ldap_back_compare( ldap_back_dn_massage( &dc, &op->orc_ava->aa_value, &mapped_val ); if (mapped_val.bv_val == NULL || mapped_val.bv_val[0] == '\0') { mapped_val = op->orc_ava->aa_value; + } else { + freeval = 1; } } } @@ -110,6 +112,9 @@ ldap_back_compare( if ( mdn.bv_val != op->o_req_dn.bv_val ) { free( mdn.bv_val ); } + if ( freeval ) { + free( mapped_val.bv_val ); + } return( ldap_back_op_result( lc, op, rs, msgid, 1 ) ); }