You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by "kezhuw (via GitHub)" <gi...@apache.org> on 2024/10/30 01:03:17 UTC
Re: [PR] ZOOKEEPER-4020: Fix memory leak from ssl cert in c client [zookeeper]
kezhuw commented on code in PR #2209:
URL: https://github.com/apache/zookeeper/pull/2209#discussion_r1821712931
##########
zookeeper-client/zookeeper-client-c/src/zookeeper.c:
##########
@@ -1324,6 +1324,8 @@ static zhandle_t *zookeeper_init_internal(const char *host, watcher_fn watcher,
if (cert) {
zh->fd->cert = calloc(1, sizeof(zcert_t));
memcpy(zh->fd->cert, cert, sizeof(zcert_t));
+ free(cert->certstr);
Review Comment:
This [crash `Zookeeper_readOnly::testReadOnlyWithSSL`](https://ci-hadoop.apache.org/blue/organizations/jenkins/zookeeper-precommit-github-pr/detail/PR-2209/2/pipeline/#step-35-log-577) which is the next test of Zookeeper_readOnly::testReadOnly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org