Fix a possible double free when tls is required but not advertised by
the server.
plug the message content through the filter fd chain.
stop casting sizeof to int
cvsid + fix two memory leaks
do not int cast a sizeof