]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/syncprov.c
Update copyright for next release
[openldap] / servers / slapd / overlays / syncprov.c
index 835ed240d7de0a8912d49e2a2cf878ebf1fbf3a9..d7c857b6bae578b040ab509fd131bd9d0de28f7b 100644 (file)
@@ -2,7 +2,7 @@
 /* syncprov.c - syncrepl provider */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2008 The OpenLDAP Foundation.
+ * Copyright 2004-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );