]> git.sur5r.net Git - openldap/commitdiff
don't use dangling stack pointers (more on ITS#6472 fix)
authorPierangelo Masarati <ando@openldap.org>
Sun, 18 Apr 2010 06:53:22 +0000 (06:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 18 Apr 2010 06:53:22 +0000 (06:53 +0000)
servers/slapd/syncrepl.c

index f05be0a49c2fe72e4f30512752b23a38b36d8050..b513b8dde0a5ea6bd9bb70cb5ad3eff91de2042c 100644 (file)
@@ -2903,9 +2903,10 @@ syncrepl_del_nonpresent(
 
 static int
 syncrepl_add_glue_ancestors(
-       Operation* op,
+       Operation* o,
        Entry *e )
 {
+       Operation op2 = *o, *op = &op2;
        Backend *be = op->o_bd;
        slap_callback cb = { NULL };
        Attribute       *a;
@@ -3041,13 +3042,20 @@ syncrepl_add_glue_ancestors(
 
 int
 syncrepl_add_glue(
-       Operation* op,
+       Operation* o,
        Entry *e )
 {
+       Operation op2 = *o, *op = &op2;
+       slap_callback cb = { NULL };
        int     rc;
        Backend *be = op->o_bd;
        SlapReply       rs_add = {REP_RESULT};
 
+       op->o_tag = LDAP_REQ_ADD;
+       op->o_callback = &cb;
+       cb.sc_response = null_callback;
+       cb.sc_private = NULL;
+
        rc = syncrepl_add_glue_ancestors( op, e );
        if ( rc != LDAP_SUCCESS ) {
                return rc;