Bug 811799 - manpage does not document whether dynamically allocated memory has to be freed
manpage does not document whether dynamically allocated memory has to be freed
Product: Fedora
Classification: Fedora
Component: popt (Show other bugs)
All All
unspecified Severity unspecified
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-11 21:54 EDT by Christoph Anton Mitterer
Modified: 2013-11-24 11:49 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-24 11:49:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Debian BTS 666245 None None None Never

  None (edit)
Description Christoph Anton Mitterer 2012-04-11 21:54:47 EDT

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.


[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.
Comment 1 Fedora End Of Life 2013-04-03 13:14:59 EDT
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:
Comment 2 Robert Scheck 2013-11-24 11:33:08 EST
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.
Comment 3 Robert Scheck 2013-11-24 11:49:52 EST
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.

Note You need to log in before you can comment on or make changes to this bug.