Better ldap cleanup.

This commit is contained in:
Todd C. Miller
2007-12-16 19:42:44 +00:00
parent c5b5f0cfd7
commit a68ab16dcd
3 changed files with 37 additions and 30 deletions

View File

@@ -393,8 +393,13 @@ log_error(flags, fmt, va_alist)
if (logline != message)
efree(logline);
if (!ISSET(flags, NO_EXIT))
if (!ISSET(flags, NO_EXIT)) {
#ifdef HAVE_LDAP
if (ldap_conn != NULL)
sudo_ldap_close(ldap_conn);
#endif
exit(1);
}
}
#define MAX_MAILFLAGS 63