]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/search.c
ITS#6625,ITS#5421
[openldap] / servers / slapd / back-meta / search.c
index 851cab0c94224fea7fbb5df87b9252d6ea39ea88..41f29346cc6860e30ab4335e7420093ebfc37551 100644 (file)
@@ -2031,7 +2031,7 @@ meta_send_entry(
        int                     check_duplicate_attrs = 0;
        int                     check_sorted_attrs = 0;
        Entry                   ent = { 0 };
-       BerElement              ber = *e->lm_ber;
+       BerElement              ber = *ldap_get_message_ber( e );
        Attribute               *attr, **attrp;
        struct berval           bdn,
                                dn = BER_BVNULL;
@@ -2281,7 +2281,7 @@ remove_oc:;
                                }
 
                                if ( rc ) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        if ( --last == i ) {
                                                BER_BVZERO( &attr->a_vals[ i ] );
                                                break;
@@ -2293,7 +2293,7 @@ remove_oc:;
                                }
 
                                if ( pretty ) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        attr->a_vals[i] = pval;
                                }
                        }
@@ -2318,7 +2318,7 @@ remove_oc:;
                                        attr->a_desc->ad_type->sat_equality,
                                        &attr->a_vals[i], &attr->a_nvals[i],
                                        NULL )) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        if ( --last == i ) {
                                                BER_BVZERO( &attr->a_vals[ i ] );
                                                break;
@@ -2400,8 +2400,8 @@ next_attr:;
 
                                        /* Strip duplicate values */
                                        if ( attr->a_nvals != attr->a_vals )
-                                               LBER_FREE( attr->a_nvals[i].bv_val );
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                               ber_memfree( attr->a_nvals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        attr->a_numvals--;
                                        if ( (unsigned)i < attr->a_numvals ) {
                                                attr->a_vals[i] = attr->a_vals[attr->a_numvals];