]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
Fixup bdb_entry_release now that entry_decode uses two memory blocks
[openldap] / servers / slapd / modify.c
index e2086b81a517f61c69390b54a6140314133e394f..783d9ac89f81482bf8a5566a74b6c5517951e55c 100644 (file)
@@ -287,8 +287,7 @@ do_modify(
         */
        if ( be->be_modify ) {
                /* do the update here */
-               int repl_user = (be->be_update_ndn != NULL &&
-                       strcmp( be->be_update_ndn, op->o_ndn ) == 0);
+               int repl_user = be_isupdate( be, op->o_ndn );
 #ifndef SLAPD_MULTIMASTER
                /* Multimaster slapd does not have to check for replicator dn
                 * because it accepts each modify request
@@ -556,7 +555,7 @@ int slap_mods_opattrs(
                mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) );
                mod->sml_bvalues[0] = ber_bvdup( &name );
                mod->sml_bvalues[1] = NULL;
-
+               assert( mod->sml_bvalues[0] );
                *modtail = mod;
                modtail = &mod->sml_next;
 
@@ -566,6 +565,7 @@ int slap_mods_opattrs(
                mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) );
                mod->sml_bvalues[0] = ber_bvdup( &timestamp );
                mod->sml_bvalues[1] = NULL;
+               assert( mod->sml_bvalues[0] );
                *modtail = mod;
                modtail = &mod->sml_next;
        }
@@ -576,6 +576,7 @@ int slap_mods_opattrs(
        mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) );
        mod->sml_bvalues[0] = ber_bvdup( &name );
        mod->sml_bvalues[1] = NULL;
+       assert( mod->sml_bvalues[0] );
        *modtail = mod;
        modtail = &mod->sml_next;
 
@@ -585,6 +586,7 @@ int slap_mods_opattrs(
        mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) );
        mod->sml_bvalues[0] = ber_bvdup( &timestamp );
        mod->sml_bvalues[1] = NULL;
+       assert( mod->sml_bvalues[0] );
        *modtail = mod;
        modtail = &mod->sml_next;