Merge pull request #11666 from opensourcerouting/fix/memory_leak_for_regexp_bgp_aspath

bgpd: Free memory for as-path filter if regexp is wrong
This commit is contained in:
Donald Sharp 2022-07-23 07:40:30 -04:00 committed by GitHub
commit 9c24c1580a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,6 +485,7 @@ DEFUN(as_path, bgp_as_path_cmd,
if (!config_bgp_aspath_validate(regstr)) {
vty_out(vty, "Invalid character in as-path access-list %s\n",
regstr);
XFREE(MTYPE_TMP, regstr);
return CMD_WARNING_CONFIG_FAILED;
}