From c9a42b3d91e85d9aa400c65f0d217648c094eef0 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 26 Jul 2016 06:44:39 -0700 Subject: [PATCH] lib: Free memory correctly when braces used in parser When braces (optional parameters) are used in the quagga parser, there was a small leak on every iteration. Since this construct is primarily used in the configuation process rather than show commands, it was not readily apparent. With the addition of the "show ip bgp {json}" form of the commands, each time one was run, memory was leaked. Ticket: CM-11435 Signed-off-by: Don Slice Reviewed By: Donald Sharp Testing Done: Manual testing, bgp-min and bgp-smoke successful --- lib/command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/command.c b/lib/command.c index eea4fc1960..b3819048e5 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1427,6 +1427,7 @@ cmd_matcher_build_keyword_args(struct cmd_matcher *matcher, { word_token = vector_slot(keyword_vector, 0); arg = word_token->cmd; + XFREE (MTYPE_TMP, keyword_args); } else { -- 2.39.5