Hi. Popt has the options to "automatically update program variables when the option is used". This is done by the argInfo and arg elements of option tables. 1) For all the pointer types, i.e. POPT_ARG_STRING and POPT_ARG_ARGV it does not document[0], what kind of memory this is (I guess dynamically allocated) and whether the user has to free this (I guess so). This is especially missing in the section "1. THE OPTION TABLE". 2) Again, for all the pointer types, i.e. POPT_ARG_STRING and POPT_ARG_ARGV it does not document, what happens to the memory previously pointed to by the arg variable. I guess(!) this is not freed (it could have been dynamically allocated), so it should at least be documented, that no special care is taken by popt. Cheers, Chris. [0] It does however document in section "3. PARSING THE COMMAND LINE", that the string returned by poptGetOptArg() has to be freed by the user. I guess the same should be the case for the variables set via POPT_ARG_STRING and POPT_ARG_ARGV.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
I am very sorry, but I do really not see how I could help here as Fedora is downstream of popt. But http://rpm5.org/community/popt-devel/0267.html is a forward of this request to upstream for discussions there.
Upstream replied to this at http://rpm5.org/community/popt-devel/0271.html - from my point of view, there is nothing left thus I am closing this report. In case you disagree with me, feel free to subscribe popt-devel mailing list at upstream and let us discuss your point directly with upstream.