From 8dd1bf096798e9926cd8aaa216a34dc1da8a5089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 15 Jan 2019 01:12:52 +1100 Subject: [PATCH] Crash when LDAP plugin is not loaded #1863 --- lib/ProxySQL_Admin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index 320ae1d61..af3d1f14b 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -4652,6 +4652,9 @@ void ProxySQL_Admin::flush_ldap_variables___database_to_runtime(SQLite3DB *db, b void ProxySQL_Admin::flush_ldap_variables___runtime_to_database(SQLite3DB *db, bool replace, bool del, bool onlyifempty, bool runtime) { proxy_debug(PROXY_DEBUG_ADMIN, 4, "Flushing LDAP variables. Replace:%d, Delete:%d, Only_If_Empty:%d\n", replace, del, onlyifempty); + if (GloMyLdapAuth == NULL) { + return; + } if (onlyifempty) { char *error=NULL; int cols=0;