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

anmolnar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


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

commit 8184fd1c6f9ca1cdad949ac2b6bb9249c17eb55f
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
---
 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