cgtest: fix all memory leaks.
I've adjusted the cmdgen main program so that it does all early returns via the 'goto out' idiom, so that they still go through all the last-minute freeing steps. That meant I had to adjust a few of the last-minute freeing steps so they don't try to do impossible things like freeing SSH2_WRONG_PASSPHRASE or calling a vtable method of a null object. Also added a couple of completely missing frees, in cmdgen itself ('outfiletmp') and in the cgtest wrapper main ('fp'). Now cgtest gets a completely clean run through Leak Sanitiser.
Please register or sign in to comment