]> git.sur5r.net Git - openldap/commitdiff
fix double free related to ITS#6720
authorPierangelo Masarati <ando@openldap.org>
Mon, 29 Nov 2010 16:03:43 +0000 (16:03 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 29 Nov 2010 16:03:43 +0000 (16:03 +0000)
servers/slapd/overlays/rwm.c

index 54e58464c7b4e3e77ad47d0921fa7cedabe95001..a0fd0316feea6a539e1824460b0f385bb37d4f93 100644 (file)
@@ -598,7 +598,7 @@ rwm_op_modify( Operation *op, SlapReply *rs )
                                        &mapping, RWM_MAP );
                        if ( drop_missing || ( mapping != NULL && BER_BVISNULL( &mapping->m_dst ) ) )
                        {
-                               goto cleanup_mod;
+                               goto skip_mod;
                        }
                }
 
@@ -693,6 +693,10 @@ next_mod:;
                mlp = &ml->sml_next;
                continue;
 
+skip_mod:;
+               *mlp = (*mlp)->sml_next;
+               continue;
+
 cleanup_mod:;
                ml = *mlp;
                *mlp = (*mlp)->sml_next;