tls_generic_test sanitisation.

You clearly love using goto.  You're ignoring several memory leaks on failure, so bothering with these ones serves no other purpose than to give you an excuse to use goto.