d7e3a37 LDAP: Fix memory leaks in synchronous_tls_setup

Authored and Committed by sgallagh 12 years ago
    LDAP: Fix memory leaks in synchronous_tls_setup
    
    We were never freeing "result" if it was allocated by
    ldap_result(). We were also not freeing "errmsg" if it was
    allocated but ldap_parse_result() returned an error.
    
    Also disambiguate error messages from ldap_parse_result() and
    error messages from sss_ldap_get_diagnostic_msg() since they use
    differing memory-management functions.