Gowrima commented on PR #2209: URL: https://github.com/apache/zookeeper/pull/2209#issuecomment-2466279138
This is the original implementation, zcert_t zcert; zcert.certstr = strdup(cert); zcert.ca = strtok(strdup(cert), ","); zcert.ca is pointing to malloc'd memory created by strdup() (https://man7.org/linux/man-pages/man3/strdup.3.html). Since zcert.ca is allocated by malloc, it has to be explicitly freed, it leads to memory leak otherwise. -- 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-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org