Basically #popt is broken if you want to avoid even one-off command line memory leaks.
And my next #C question 🙂
I use #popt a lot, it is great.
I always find some post issue left over when running #valgrind, caused by post. It is always small and so not something I worried much about.
I noticed it seems to be that a string argument to my command from popt is in fact malloc'd. I.e. I can free() it without error, and that fixes the valgrind complaint.
But the man page on popt does not say which things it malloc's.
Does popt always do it? What things does it do it for?