Hi, the popt source code references firstname.lastname@example.org as the maintainer,
but that bounced, so hopefully this is the right place to send this...
Sorry if this is old news to people... I /just/ discovered a memory
leak in my use of poptGetNextOpt(). It wasn't clear from the man page
that the calling function must deallocate this memory, so I added it
Is this the intended behavior? If so, it seems that poptGetNextOpt()
should return "char *" instead of "const char *".
I'm referencing popt as included in rpm-184.108.40.206 and the version of popt
I'm using is 220.127.116.11-2.fc6
However, I did just check popt-1.12 in the fc8 project and saw the exact
same code, so I don't think it's changed in a while.
--- popt.3.orig 2007-11-29 13:26:14.904926497 -0800
+++ popt.3 2007-11-29 13:27:32.687138451 -0800
@@ -367,6 +367,7 @@
This function returns the argument given for the final option returned by
.BR poptGetNextOpt() ", or it returns " NULL " if no argument was specified."
+The calling function is responsible for deallocating this string.
.SS "4. LEFTOVER ARGUMENTS"
Many applications take an arbitrary number of command-line arguments,
Received on Fri Dec 7 01:06:17 2007