From: Pierangelo Masarati Date: Sun, 18 Apr 2010 06:53:22 +0000 (+0000) Subject: don't use dangling stack pointers (more on ITS#6472 fix) X-Git-Tag: MIGRATION_CVS2GIT~615 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4480b22a91949efe03c8061dc696bc4284772b6d;p=openldap don't use dangling stack pointers (more on ITS#6472 fix) --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index f05be0a49c..b513b8dde0 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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;