Basically #popt is broken if you want to avoid even one-off command line memory leaks.
Using #popt
https://github.com/DerHirschi/AX25_POPT
to send and receive #packetradio messages https://youtu.be/V2et64HorBg #direwolf
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 memory issue left over when running #valgrind, caused by popt. 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?