From: Don Slice Date: Tue, 26 Jul 2016 13:44:39 +0000 (-0700) Subject: lib: Free memory correctly when braces used in parser X-Git-Tag: frr-2.0-rc1~449 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c9a42b3d91e85d9aa400c65f0d217648c094eef0;p=matthieu%2Ffrr.git 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 --- 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 {