]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Fix `show route-map NAME json` command and memory leak
authorDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 26 Sep 2022 11:49:54 +0000 (14:49 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 26 Sep 2022 11:56:20 +0000 (14:56 +0300)
JSON object was generated, but not printed, because the function returned
immediatelly, even without freeing the memory.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
lib/routemap.c

index e6310465e333484752ef7970347cdcc8fdfbef3a..3cc010c148d454cdf4147367d4acb69a33b75b0d 100644 (file)
@@ -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);