summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-11 11:13:09 +0200
committerGitHub <noreply@github.com>2021-10-11 11:13:09 +0200
commitb6641f01f42461dbbc2e1af5e9e0ef3c32187f10 (patch)
tree22997dee89d2213b7c145f712ae089c9d557b3f7 /bgpd
parentMerge pull request #9760 from mobash-rasool/ospfv2-bug-fixes-02 (diff)
parentbgpd: don't return pointer to a local variable (diff)
downloadfrr-b6641f01f42461dbbc2e1af5e9e0ef3c32187f10.tar.xz
frr-b6641f01f42461dbbc2e1af5e9e0ef3c32187f10.zip
Merge pull request #9780 from idryzhov/bgp-local-pointer
bgpd: don't return pointer to a local variable
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c
index 376172a6f..4ed8c7c59 100644
--- a/bgpd/bgp_table.c
+++ b/bgpd/bgp_table.c
@@ -88,7 +88,7 @@ struct bgp_dest *bgp_dest_lock_node(struct bgp_dest *dest)
const char *bgp_dest_get_prefix_str(struct bgp_dest *dest)
{
const struct prefix *p = NULL;
- char str[PREFIX_STRLEN] = {0};
+ static char str[PREFIX_STRLEN] = {0};
p = bgp_dest_get_prefix(dest);
if (p)