]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/unbind.c
Zero out op2
[openldap] / servers / slapd / back-ldap / unbind.c
index e93dba2c89035feab94fad81b9b1507f2ac005cb..17d0bb763b740b41eaacc20d4d161e6269047d82 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <stdio.h>
 
+#include <ac/errno.h>
 #include <ac/socket.h>
 #include <ac/string.h>
 
@@ -53,8 +54,10 @@ ldap_back_conn_destroy(
 
        if ( lc ) {
                Debug( LDAP_DEBUG_TRACE,
-                       "=>ldap_back_conn_destroy: destroying conn %ld\n",
-                       lc->lc_conn->c_connid, 0, 0 );
+                       "=>ldap_back_conn_destroy: destroying conn %ld (refcnt=%u)\n",
+                       lc->lc_conn->c_connid, lc->lc_refcnt, 0 );
+
+               assert( lc->lc_refcnt == 0 );
 
                /*
                 * Needs a test because the handler may be corrupted,