]> git.sur5r.net Git - openldap/commitdiff
ITS#8690 fix again
authorHoward Chu <hyc@openldap.org>
Fri, 4 Aug 2017 12:40:34 +0000 (13:40 +0100)
committerHoward Chu <hyc@openldap.org>
Fri, 4 Aug 2017 12:40:34 +0000 (13:40 +0100)
servers/slapd/overlays/syncprov.c

index 27c49a2a3c3a8a76f3ae098829cce6f3dc797b56..4fff71f21285e5951fe5c6ec59940e909f329884 100644 (file)
@@ -1973,13 +1973,14 @@ syncprov_op_response( Operation *op, SlapReply *rs )
                                /* for each match in opc->smatches:
                                 *   send DELETE msg
                                 */
+                               ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
                                for ( sm = opc->smatches; sm; sm=sm->sm_next ) {
                                        if ( sm->sm_op->s_op->o_abandon )
                                                continue;
                                        syncprov_qresp( opc, sm->sm_op, LDAP_SYNC_DELETE );
-                                       if ( opc->ssres.s_info )
-                                               free_resinfo( &opc->ssres );
                                }
+                               free_resinfo( &opc->ssres );
+                               ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
                                break;
                        }
                }