Call cleanup() before exit in log_error() instead of calling

sudo_ldap_close() directly.  ldap_conn can now be static to sudo.c
This commit is contained in:
Todd C. Miller
2007-12-17 12:28:51 +00:00
parent ed88a812ec
commit ff0a538d04
3 changed files with 2 additions and 6 deletions

View File

@@ -394,10 +394,7 @@ log_error(flags, fmt, va_alist)
efree(logline);
if (!ISSET(flags, NO_EXIT)) {
#ifdef HAVE_LDAP
if (ldap_conn != NULL)
sudo_ldap_close(ldap_conn);
#endif
cleanup(0);
exit(1);
}
}