From 4c17bee53f04053348e7a65b9d41df1e0aa52fdd Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Mon, 26 Sep 2022 14:49:54 +0300 Subject: [PATCH] lib: Fix `show route-map NAME json` command and memory leak JSON object was generated, but not printed, because the function returned immediatelly, even without freeing the memory. Signed-off-by: Donatas Abraitis --- lib/routemap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/routemap.c b/lib/routemap.c index e6310465e3..3cc010c148 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1059,7 +1059,6 @@ static int vty_show_route_map(struct vty *vty, const char *name, bool use_json) if (map) { vty_show_route_map_entry(vty, map, json_proto); - return CMD_SUCCESS; } else if (!use_json) { vty_out(vty, "%s: 'route-map %s' not found\n", frr_protonameinst, name); -- 2.39.5