some minor potential leak fixes

some of these look like clear potential leaks, others looks like highly suspicious code that could be leaks. i.e. all the initresp strings that aren't being freed. The relationships between all the returned argument was a bit too complicated to map out to convince myself that these are leaks, but it seems more robust to not have code that depends on implementation details of the functions it calls.