diff -Nuar autofs-5.0.7-orig/modules/lookup_ldap.c autofs-5.0.7/modules/lookup_ldap.c --- autofs-5.0.7-orig/modules/lookup_ldap.c 2012-10-02 11:44:21.000000000 -0400 +++ autofs-5.0.7/modules/lookup_ldap.c 2012-10-02 11:44:46.000000000 -0400 @@ -585,10 +585,12 @@ { LDAP *ldap; +#ifdef WITH_SASL if (ctxt->extern_cert && ctxt->extern_key) { set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert); set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key); } +#endif ldap = init_ldap_connection(logopt, uri, ctxt); if (ldap) { @@ -1385,10 +1387,12 @@ defaults_free_searchdns(ctxt->sdns); if (ctxt->dclist) free_dclist(ctxt->dclist); +#ifdef WITH_SASL if (ctxt->extern_cert) free(ctxt->extern_cert); if (ctxt->extern_key) free(ctxt->extern_key); +#endif free(ctxt); return;