]> git.sur5r.net Git - openldap/commitdiff
Import ITS#3403 fix (syncrepl memory corruption) from HEAD
authorHoward Chu <hyc@openldap.org>
Wed, 24 Nov 2004 06:26:25 +0000 (06:26 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 24 Nov 2004 06:26:25 +0000 (06:26 +0000)
servers/slapd/syncrepl.c

index 75e6f0315d364587d7a22b9070432bce9555912a..24e31fab1895178deb42af00b2c9b8fdc5a4f40f 100644 (file)
@@ -1423,7 +1423,7 @@ syncrepl_del_nonpresent(
        Modifications *mlnext;
        Modifications *mod;
        Modifications *modlist = NULL;
-       Modifications **modtail = &modlist;
+       Modifications **modtail;
        Attribute       *attr;
 
        struct berval pdn = BER_BVNULL;
@@ -1478,6 +1478,7 @@ syncrepl_del_nonpresent(
                        rc = op->o_bd->be_delete( op, &rs_delete );
 
                        if ( rs_delete.sr_err == LDAP_NOT_ALLOWED_ON_NONLEAF ) {
+                               modtail = &modlist;
                                mod = (Modifications *) ch_calloc( 1, sizeof( Modifications ));
                                mod->sml_op = LDAP_MOD_REPLACE;
                                mod->sml_desc = slap_schema.si_ad_objectClass;