bgpd: don't return pointer to a local variable

CID 1507651.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2021-10-08 14:51:15 +03:00
parent b1e27fbba4
commit 95f473e0d2

View File

@ -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)