You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Xiaotian Qi (Jira)" <ji...@apache.org> on 2020/09/24 11:44:00 UTC
[jira] [Created] (ZOOKEEPER-3944) zookeeper c api sasl client
memory leak
Xiaotian Qi created ZOOKEEPER-3944:
--------------------------------------
Summary: zookeeper c api sasl client memory leak
Key: ZOOKEEPER-3944
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3944
Project: ZooKeeper
Issue Type: Bug
Components: c client
Affects Versions: 3.6.2
Reporter: Xiaotian Qi
I find this memory leak through sanitizer.
[Here|https://github.com/apache/zookeeper/blob/master/zookeeper-client/zookeeper-client-c/src/zookeeper.c#L664-L665] within zookeeper_close() it destroy the client and reset it to NULL. This client is created using calloc()
In zoo_sasl_client_destroy(), the client is not freed, neither within zookeeper_close().
I would suggest add a free() before setting it to NULL in zookeeper_close
--
This message was sent by Atlassian Jira
(v8.3.4#803005)