]> git.sur5r.net Git - openldap/commitdiff
Actually free mapped attrval
authorHoward Chu <hyc@openldap.org>
Mon, 7 Apr 2003 10:31:32 +0000 (10:31 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 7 Apr 2003 10:31:32 +0000 (10:31 +0000)
servers/slapd/back-ldap/compare.c

index 966b9188c7954e159f492bedd707b346c5c5427c..3d8230386deb00dd00d352365d0ce9726f23a093 100644 (file)
@@ -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 ) );
 }