From 97c81b4ef67e2f5061c07cbb441c4e8825a2a132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 9 Mar 2018 16:59:13 +0100 Subject: [PATCH] Initialize qr in Query_Processor --- lib/Query_Processor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Query_Processor.cpp b/lib/Query_Processor.cpp index 987d70fb6..a62a6f2ae 100644 --- a/lib/Query_Processor.cpp +++ b/lib/Query_Processor.cpp @@ -912,7 +912,7 @@ Query_Processor_Output * Query_Processor::process_mysql_query(MySQL_Session *ses spin_rdunlock(&rwlock); // unlock should be after the copy #endif } - QP_rule_t *qr; + QP_rule_t *qr = NULL; re2_t *re2p; int flagIN=0; ret->next_query_flagIN=-1; // reset @@ -1154,7 +1154,7 @@ __internal_loop: } __exit_process_mysql_query: - if (qr->apply == false) { + if (qr == NULL || qr->apply == false) { // now it is time to check mysql_query_rules_fast_routing // it is only check if "apply" is not true string s = sess->client_myds->myconn->userinfo->username;