mirror_frr/pbrd
Stephen Worley 10fcd2a2a6 pbrd: free nexthop_group name on no set nexthop-group
Properly free the string pointed to by `pbrms->nhgrp_name`
when we are removiing the config for a nexthop group
on a pbr map sequence.

Found via memleak:
==3152214== 4 bytes in 1 blocks are definitely lost in loss record 308 of 8,814
==3152214==    at 0x483980B: malloc (vg_replace_malloc.c:309)
==3152214==    by 0x4DC9F7E: strdup (in /usr/lib64/libc-2.30.so)
==3152214==    by 0x48E373E: qstrdup (memory.c:122)
==3152214==    by 0x408FE7: pbr_map_nexthop_group_magic (pbr_vty.c:264)
==3152214==    by 0x408E04: pbr_map_nexthop_group (pbr_vty_clippy.c:347)
==3152214==    by 0x48ACF72: cmd_execute_command_real (command.c:1073)
==3152214==    by 0x48ACB3B: cmd_execute_command (command.c:1133)
==3152214==    by 0x48AD063: cmd_execute (command.c:1288)
==3152214==    by 0x493D8EE: vty_command (vty.c:526)
==3152214==    by 0x493D397: vty_execute (vty.c:1293)
==3152214==    by 0x493C4EC: vtysh_read (vty.c:2126)
==3152214==    by 0x49319DC: thread_call (thread.c:1548)

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2020-04-09 13:37:55 -04:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
Makefile pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
pbr_debug.c pbrd: Fix unused function 2018-04-17 18:43:47 -04:00
pbr_debug.h pbrd: move debug vty into pbr_vty.c 2018-04-17 18:43:47 -04:00
pbr_main.c *: make frr_yang_module_info const 2019-11-30 00:38:32 +01:00
pbr_map.c pbrd: free nexthop_group name on no set nexthop-group 2020-04-09 13:37:55 -04:00
pbr_map.h pbrd: Add set vrf NAME and set vrf unchanged 2019-11-21 16:59:42 -05:00
pbr_memory.c pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
pbr_memory.h pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
pbr_nht.c pbrd: delete pbr nhg cache after rlease from hash 2020-04-09 13:37:55 -04:00
pbr_nht.h pbrd: add support for interface nexthops 2019-02-14 22:57:39 -02:00
pbr_vrf.c pbrd: Add set vrf NAME and set vrf unchanged 2019-11-21 16:59:42 -05:00
pbr_vrf.h pbrd: Add set vrf NAME and set vrf unchanged 2019-11-21 16:59:42 -05:00
pbr_vty.c pbrd: convert gotos in set vrf command to returns 2020-03-19 14:30:42 -04:00
pbr_vty.h pbrd, lib: move PBR_STR def. to lib 2018-06-13 16:22:01 +00:00
pbr_zebra.c pbrd: add seqno to debug in pbr_send_pbr_map 2020-04-09 13:37:55 -04:00
pbr_zebra.h *: Add infrastructure to support zapi interface callbacks 2019-09-19 13:34:06 -04:00
pbrd.conf.sample pbrd, sharpd, staticd: Add some color to sample configuration files 2019-08-19 10:36:53 -04:00
subdir.am doc: rename man pages to frr-* 2020-01-15 14:05:11 +01:00