mirror_frr/bgpd
Keelan10 411cb8a827 bgpd: Free memory in set_aspath_exclude_access_list
Properly free the dynamically allocated memory held by `str` after its use.
The change also maintains the return value of `nb_cli_apply_changes` by using `ret` variable.

The ASan leak log for reference:

```
Direct leak of 55 byte(s) in 2 object(s) allocated from:
    #0 0x7f16f285f867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f16f23fda11 in qmalloc ../lib/memory.c:100
    #2 0x7f16f23a01a0 in frrstr_join ../lib/frrstr.c:89
    #3 0x7f16f23418c7 in argv_concat ../lib/command.c:183
    #4 0x55aba24731f2 in set_aspath_exclude_access_list_magic ../bgpd/bgp_routemap.c:6327
    #5 0x55aba2455cf4 in set_aspath_exclude_access_list bgpd/bgp_routemap_clippy.c:836
    #6 0x7f16f2345d61 in cmd_execute_command_real ../lib/command.c:993
    #7 0x7f16f23460ee in cmd_execute_command ../lib/command.c:1052
    #8 0x7f16f2346dc0 in cmd_execute ../lib/command.c:1218
    #9 0x7f16f24f7197 in vty_command ../lib/vty.c:591
    #10 0x7f16f24fc07c in vty_execute ../lib/vty.c:1354
    #11 0x7f16f250247a in vtysh_read ../lib/vty.c:2362
    #12 0x7f16f24e72f4 in event_call ../lib/event.c:1979
    #13 0x7f16f23d1828 in frr_run ../lib/libfrr.c:1213
    #14 0x55aba2269e52 in main ../bgpd/bgp_main.c:510
    #15 0x7f16f1dbfd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
```

Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
2023-08-19 14:00:17 +04:00
..
rfapi bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
rfp-example *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
bgp_addpath_types.h bgpd: Implement neighbor X addpath-tx-best-selected command 2023-06-07 22:27:29 +03:00
bgp_addpath.c bgpd: Implement neighbor X addpath-tx-best-selected command 2023-06-07 22:27:29 +03:00
bgp_addpath.h bgpd: Implement neighbor X addpath-tx-best-selected command 2023-06-07 22:27:29 +03:00
bgp_advertise.c bgpd: Remove peer->sync array 2023-07-21 12:41:35 -04:00
bgp_advertise.h bgpd: Remove withdraw_low from system, it is never used 2023-07-21 12:46:31 -04:00
bgp_aspath.c bgpd: add set as-path exclude acl-list command 2023-08-07 12:30:34 +02:00
bgp_aspath.h bgpd: add set as-path exclude acl-list command 2023-08-07 12:30:34 +02:00
bgp_attr_evpn.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_attr_evpn.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_attr.c bgpd: Fix update message error handling for multiple same attributes 2023-08-12 04:10:05 -07:00
bgp_attr.h bgpd: Use SET_FLAG when setting AIGP attribute flag 2023-08-03 22:54:54 +03:00
bgp_bfd.c doc: Add missing rfc9384 to BGP supported RFC list 2023-04-01 21:56:37 +03:00
bgp_bfd.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_bmp.c bgpd: bmp fix peer-up ports byte order 2023-04-03 17:19:32 +02:00
bgp_bmp.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_btoa.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_clist.c bgpd: Remove deprecated COMMUNITY_INTERNET community 2023-08-03 17:12:19 +03:00
bgp_clist.h bgpd: add set extended-comm-list <> delete command 2023-07-31 11:52:36 +02:00
bgp_community_alias.c *: Add a hash_clean_and_free() function 2023-03-21 08:54:21 -04:00
bgp_community_alias.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_community.c bgpd: Remove deprecated COMMUNITY_INTERNET community 2023-08-03 17:12:19 +03:00
bgp_community.h bgpd: Remove deprecated COMMUNITY_INTERNET community 2023-08-03 17:12:19 +03:00
bgp_conditional_adv.c *: Convert THREAD_XXX macros to EVENT_XXX macros 2023-03-24 08:32:17 -04:00
bgp_conditional_adv.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_damp.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_damp.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_debug.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_debug.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_dump.c bgpd: increase buffer size used for dumping BGP to MRT files 2023-03-30 14:23:48 +01:00
bgp_dump.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_ecommunity.c Merge pull request #13882 from opensourcerouting/fix/dead_code 2023-07-01 14:33:07 -04:00
bgp_ecommunity.h Merge pull request #13722 from fdumontet6WIND/color_extcomm 2023-06-27 13:03:22 +03:00
bgp_encap_tlv.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_encap_tlv.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_encap_types.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_errors.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_errors.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_evpn_mh.c bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_evpn_mh.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_evpn_private.h bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_evpn_vty.c bgpd: Refactor bgp_static_set/bgp_static_set_safi 2023-08-14 17:10:07 +03:00
bgp_evpn_vty.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_evpn.c bgpd: evpn code was not properly unlocking rd_dest 2023-08-11 10:11:10 -04:00
bgp_evpn.h bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_filter.c bgpd: add set as-path exclude acl-list command 2023-07-19 10:57:48 +02:00
bgp_filter.h bgpd: add set as-path exclude acl-list command 2023-07-19 10:57:48 +02:00
bgp_flowspec_private.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_util.c bgpd: add some flowspec sanity returns 2023-04-28 22:28:16 +02:00
bgp_flowspec_util.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_vty.c bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_flowspec.c bgpd: Free temp memory 2023-05-29 13:39:14 +04:00
bgp_flowspec.h bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_fsm.c bgpd: Remove peer->obuf_work 2023-07-21 12:30:20 -04:00
bgp_fsm.h bgpd: Use enum bgp_fsm_state_progress for bgp_stop() 2023-06-13 16:01:40 +03:00
bgp_io.c bgpd: With io limit allow parsing to continue even if memory is low 2023-07-24 10:41:00 -04:00
bgp_io.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_keepalives.c *: Convert THREAD_XXX macros to EVENT_XXX macros 2023-03-24 08:32:17 -04:00
bgp_keepalives.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_label.c bgpd: add a function to compare two label lists 2023-06-16 10:54:58 +02:00
bgp_label.h bgpd: add a function to compare two label lists 2023-06-16 10:54:58 +02:00
bgp_labelpool.c bgpd: fix whitespace/indent in bgp_labelpool module 2023-08-09 17:01:16 -04:00
bgp_labelpool.h bgpd: Use synchronous way to get labels from Zebra 2023-06-20 20:50:10 +03:00
bgp_lcommunity.c bgpd: Fix lcom->str string length to correctly cover aliases 2023-04-20 16:51:56 -04:00
bgp_lcommunity.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mac.c bgpd: only rescan EVPN tables if self-mac changes 2023-05-30 15:20:35 +00:00
bgp_mac.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_main.c bgpd: Allow bgp to specify if it will allow v6 routing with v4 nexthops 2023-08-03 08:25:20 -04:00
bgp_memory.c bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_memory.h bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_mpath.c bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_mpath.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mplsvpn_snmp.c bgpd: Coverity mistakenly believes we can fall through 2023-04-21 07:57:19 -04:00
bgp_mplsvpn_snmp.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mplsvpn.c bgpd: Refactor bgp_static_set/bgp_static_set_safi 2023-08-14 17:10:07 +03:00
bgp_mplsvpn.h bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_network.c bgpd: Add some color to why nexthop_set failed 2023-06-12 09:22:51 -04:00
bgp_network.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_nexthop.c bgpd: rename bnc->ifindex to bnc->ifindex_ipv6_ll 2023-07-13 12:05:15 +02:00
bgp_nexthop.h bgpd: rename bnc->ifindex to bnc->ifindex_ipv6_ll 2023-07-13 12:05:15 +02:00
bgp_nht.c bgpd: Set ifindex to find the correct nexthop 2023-08-16 15:27:38 -07:00
bgp_nht.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_open.c bgpd: Send software-version capability by default 2023-07-18 09:42:48 +03:00
bgp_open.h bgpd: Deprecate Prestandard Outbound Route Filtering capability 2023-07-07 23:41:43 +03:00
bgp_packet.c Merge pull request #14154 from opensourcerouting/feature/bgpd_handle_role_capability_using_dynamic_capability 2023-08-08 10:47:04 -04:00
bgp_packet.h bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_pbr.c bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgp_pbr.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_rd.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_rd.h Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_regex.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_regex.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_route.c bgpd: fix coverity issue in bgpd 2023-08-15 11:14:16 -07:00
bgp_route.h bgpd: Refactor bgp_static_set/bgp_static_set_safi 2023-08-14 17:10:07 +03:00
bgp_routemap_nb_config.c bgpd: add set extended-comm-list <> delete command 2023-07-31 11:52:36 +02:00
bgp_routemap_nb.c bgpd: add colored extended communities support 2023-06-26 14:27:27 +02:00
bgp_routemap_nb.h bgpd: add colored extended communities support 2023-06-26 14:27:27 +02:00
bgp_routemap.c bgpd: Free memory in set_aspath_exclude_access_list 2023-08-19 14:00:17 +04:00
bgp_rpki.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_rpki.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_script.c lib: Do not use time_t as a special Lua encoder/decoder 2023-08-01 14:08:25 +03:00
bgp_script.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_snmp_bgp4.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_snmp_bgp4.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_snmp_bgp4v2.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_snmp_bgp4v2.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_snmp.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_snmp.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_table.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_table.h bgpd: Fix missing deletion of evpn routes 2023-06-03 09:27:53 +08:00
bgp_trace.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
bgp_trace.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_updgrp_adv.c Merge pull request #13728 from opensourcerouting/fix/addpath_drop_non_best_addpaths 2023-06-20 09:20:36 -04:00
bgp_updgrp_packet.c bgpd: Assign explicit-null for default-originate according to the AFI 2023-08-11 10:52:40 +03:00
bgp_updgrp.c bgpd: Remove withdraw_low from system, it is never used 2023-07-21 12:46:31 -04:00
bgp_updgrp.h bgpd: Remove withdraw_low from system, it is never used 2023-07-21 12:46:31 -04:00
bgp_vnc_types.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vpn.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vpn.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vty.c bgpd: Fix CLI descriptions for bgp confederation identifier 2023-08-16 08:37:23 +03:00
bgp_vty.h bgpd: Use enum bgp_create_error_code as argument in header 2023-06-13 16:08:24 +03:00
bgp_zebra.c Merge pull request #14126 from LabNConsulting/ziemba-pbr-actions-mangling 2023-08-13 16:39:07 +03:00
bgp_zebra.h bgpd: bgp_path_info_extra memory optimization 2023-08-08 10:48:07 +00:00
bgpd.c bgpd: Handle role capability using dynamic capability 2023-08-05 22:44:45 +03:00
bgpd.h bgpd: Have bgp notice the zebra ability to use v6_with_v4_nexthops 2023-08-03 08:25:20 -04:00
Makefile build: non-recursive bgpd & rfp 2018-09-08 21:25:59 +02:00
subdir.am Revert "bgpd: optimal router reflection cli and fsm changes" 2023-01-17 18:15:28 +02:00