From bf1d70aa2873c57dbfee3b23a2f4b2c563ca06ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Sun, 31 Jul 2022 21:23:09 +0200 Subject: [PATCH] Fix memory leaks in 'Query_Processor' for Query Rules 'attributes' and 'comment' fields --- lib/Query_Processor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Query_Processor.cpp b/lib/Query_Processor.cpp index 51898fa46..11f0c8f24 100644 --- a/lib/Query_Processor.cpp +++ b/lib/Query_Processor.cpp @@ -386,6 +386,10 @@ static void __delete_query_rule(QP_rule_t *qr) { free(qr->error_msg); if (qr->OK_msg) free(qr->OK_msg); + if (qr->attributes) + free(qr->attributes); + if (qr->comment) + free(qr->comment); if (qr->regex_engine1) { re2_t *r=(re2_t *)qr->regex_engine1; if (r->opt1) { delete r->opt1; r->opt1=NULL; }