The Samba-Bugzilla – Bug 12173
memory leak around poptGetOptArg()
Last modified: 2016-08-24 13:34:48 UTC
Description of problem:
In poptGetOptArg(), con->os->nextArg is set to be NULL, which means the returned memory is out of popt management.
We have to free it.
Version-Release number of selected component (if applicable):
(perhaps the latest version is also affected, according to the source code)
always, with "--chmod=u+x" flag
Steps to Reproduce:
valgrind --tool=memcheck rsync --chmod=u+x
valgrind indicates memory leak.
no memory leak, at least no big ones.
Carefully read, it looks like POPT_ARG_STRING values also have to be freed (such as shell_cmd and logfile_name).
But since they are global variables, they are represented as "still reachable".
Further investigation is required for this side.