]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapi/slapi_utils.c
Add BackendInfo.bi_extra for backend custom APIs
[openldap] / servers / slapd / slapi / slapi_utils.c
index 6516a68bac82411d2f8c52428d6a2cfbc273621b..3a0939ff43a16e0f9e493a8265579ec387d3c006 100644 (file)
@@ -205,7 +205,7 @@ slapi_entry_attr_delete(
 Slapi_Entry *
 slapi_entry_alloc( void ) 
 {
-       return (Slapi_Entry *)slapi_ch_calloc( 1, sizeof(Slapi_Entry) );
+       return (Slapi_Entry *)entry_alloc();
 }
 
 void 
@@ -1349,8 +1349,13 @@ slapi_send_ldap_result(
        } else {
                if ( pb->pb_op->o_tag == LDAP_REQ_SEARCH )
                        rs->sr_nentries = nentries;
+               if ( urls != NULL )
+                       bvptr2obj( urls, &rs->sr_ref );
 
                send_ldap_result( pb->pb_op, rs );
+
+               if ( urls != NULL )
+                       slapi_ch_free( (void **)&rs->sr_ref );
        }
 }
 
@@ -1377,7 +1382,7 @@ slapi_send_ldap_search_entry(
        }
 
        if ( i ) {
-               an = (AttributeName *) slapi_ch_malloc( (i+1) * sizeof(AttributeName) );
+               an = (AttributeName *) slapi_ch_calloc( i + 1, sizeof(AttributeName) );
                for ( i = 0; attrs[i] != NULL; i++ ) {
                        an[j].an_name.bv_val = attrs[i];
                        an[j].an_name.bv_len = strlen( attrs[i] );