summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ldap/servers/slapd/connection.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index 8686d16e..bab33453 100644
--- a/ldap/servers/slapd/connection.c
+++ b/ldap/servers/slapd/connection.c
@@ -991,6 +991,13 @@ done:
}
PR_Unlock( conn->c_mutex );
+ } else { /* ps code acquires ref to conn - we need to release ours here */
+ PR_Lock( conn->c_mutex );
+ if (connection_release_nolock (conn) != 0)
+ {
+ return_value = -1;
+ }
+ PR_Unlock( conn->c_mutex );
}
return return_value;
}
@@ -2314,6 +2321,10 @@ done:
connection_release_nolock (conn);
}
PR_Unlock( conn->c_mutex );
+ } else { /* the ps code acquires a ref to the conn - we need to release ours here */
+ PR_Lock( conn->c_mutex );
+ connection_release_nolock (conn);
+ PR_Unlock( conn->c_mutex );
}
/* Since we didn't do so earlier, we need to make a replication connection readable again here */
if ( ((1 == is_timedout) || (replication_connection && !thread_turbo_flag)) && !more_data)