]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/add.c
plug leaks
[openldap] / servers / slapd / add.c
index a5fa0769b01c7d189f0b586b0058a81d3b823776..314d044aab249978f40cf5c1998a4e69337ceb27 100644 (file)
@@ -180,6 +180,13 @@ do_add( Operation *op, SlapReply *rs )
 
        op->o_bd = frontendDB;
        rc = frontendDB->be_add( op, rs );
+
+#ifdef LDAP_X_TXN
+       if ( rc == LDAP_X_TXN_SPECIFY_OKAY ) {
+               /* skip cleanup */
+               return rc;
+       } else
+#endif
        if ( rc == 0 ) {
                if ( op->ora_e != NULL && op->o_private != NULL ) {
                        BackendDB       *bd = op->o_bd;
@@ -281,8 +288,7 @@ fe_op_add( Operation *op, SlapReply *rs )
        if ( op->o_bd->be_add ) {
                /* do the update here */
                int repl_user = be_isupdate( op );
-               if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user )
-               {
+               if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) {
                        int             update = !BER_BVISEMPTY( &op->o_bd->be_update_ndn );
                        slap_callback   cb = { NULL, slap_replog_cb, NULL, NULL };
 
@@ -645,9 +651,9 @@ int slap_add_opattrs(
 
        if ( SLAP_LASTMOD( op->o_bd ) ) {
                char *ptr;
-               timestamp.bv_val = timebuf;
                int gotcsn = 0;
 
+               timestamp.bv_val = timebuf;
                a = attr_find( op->ora_e->e_attrs, slap_schema.si_ad_entryCSN );
                if ( a ) {
                        gotcsn = 1;