]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Do not unlock client unless we are destroying it
authorOndřej Kuzník <ondra@mistotebe.net>
Fri, 14 Jul 2017 12:47:30 +0000 (13:47 +0100)
committerOndřej Kuzník <okuznik@symas.com>
Tue, 17 Nov 2020 17:55:46 +0000 (17:55 +0000)
servers/lloadd/operation.c

index 01b4dc3c3d51d907318245da0df687e33c3a1696..14bf4bd7980b3d38034e1028eb584d0f30479118 100644 (file)
@@ -778,6 +778,7 @@ request_process( Connection *client, Operation *op )
 
     output = upstream->c_pendingber;
     if ( output == NULL && (output = ber_alloc()) == NULL ) {
+        rc = -1;
         goto fail;
     }
     upstream->c_pendingber = output;
@@ -851,9 +852,8 @@ fail:
     CONNECTION_LOCK_DECREF(client);
     op->o_client_refcnt--;
     operation_destroy_from_client( op );
-    CLIENT_UNLOCK_OR_DESTROY(client);
-    if ( !client ) {
-        rc = -1;
+    if ( rc ) {
+        CLIENT_DESTROY(client);
     }
     return rc;
 }