Skip to content
Snippets Groups Projects
Commit 1a3fd9f7 authored by Emily Backes's avatar Emily Backes Committed by Quanah Gibson-Mount
Browse files

ITS#7712 Fix lock ordering in libldap abandon

parent b9ce8460
No related branches found
No related tags found
No related merge requests found
......@@ -279,9 +279,14 @@ start_again:;
if ( lr != NULL ) {
if ( sendabandon || lr->lr_status == LDAP_REQST_WRITING ) {
/* release ld_req_mutex while grabbing ld_conn_mutex to
* prevent deadlock.
*/
LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
ldap_free_connection( ld, lr->lr_conn, 0, 1 );
LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
}
if ( origid == msgid ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment