]> git.sur5r.net Git - openldap/commitdiff
ITS#5827, release syncop after mod op completes
authorHoward Chu <hyc@openldap.org>
Sun, 23 Nov 2008 20:43:39 +0000 (20:43 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 23 Nov 2008 20:43:39 +0000 (20:43 +0000)
servers/slapd/overlays/syncprov.c

index 835ed240d7de0a8912d49e2a2cf878ebf1fbf3a9..64c5ffc243a829b3efa0578d5d881c3dbd38029f 100644 (file)
@@ -1259,6 +1259,12 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
                        /* send DELETE */
                        syncprov_qresp( opc, ss, LDAP_SYNC_DELETE );
                }
+               if ( !saveit && found ) {
+                       /* Decrement s_inuse, was incremented when called
+                        * with saveit == TRUE
+                        */
+                       syncprov_free_syncop( ss );
+               }
        }
        ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );