This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch branch-3.9
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.9 by this push:
     new cf89cf800 ZOOKEEPER-5009: Memory Leak in zoo_sasl_client_create
cf89cf800 is described below

commit cf89cf80036f80b62faedc6b9e304eb0d7542005
Author: Nihir Agarwal <[email protected]>
AuthorDate: Fri May 1 00:17:46 2026 +0530

    ZOOKEEPER-5009: Memory Leak in zoo_sasl_client_create
    
    Reviewers: kezhuw
    Author: nihiragarwal24
    Closes #2341 from nihiragarwal24/ZOOKEEPER-5009
    
    (cherry picked from commit 8184fd1c6f9ca1cdad949ac2b6bb9249c17eb55f)
    Signed-off-by: Andor Molnar <[email protected]>
---
 zookeeper-client/zookeeper-client-c/src/zk_sasl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/zookeeper-client/zookeeper-client-c/src/zk_sasl.c 
b/zookeeper-client/zookeeper-client-c/src/zk_sasl.c
index 587b93b51..c741a8894 100644
--- a/zookeeper-client/zookeeper-client-c/src/zk_sasl.c
+++ b/zookeeper-client/zookeeper-client-c/src/zk_sasl.c
@@ -104,6 +104,7 @@ zoo_sasl_client_t *zoo_sasl_client_create(zoo_sasl_params_t 
*sasl_params)
 
     if (rc != ZOK) {
         zoo_sasl_client_destroy(sc);
+        free(sc);
         return NULL;
     }
 

Reply via email to