mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 06:14:35 +00:00
bgpd: Use a more appropriate memory type for a string
Track the memory type associated with the bartian address interface a bit better, instead of using MTYPE_TMP. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
13894ce894
commit
330cec3de0
@ -47,6 +47,8 @@
|
||||
#include "zebra/rib.h"
|
||||
#include "zebra/zserv.h" /* For ZEBRA_SERV_PATH. */
|
||||
|
||||
DEFINE_MTYPE_STATIC(BGPD, MARTIAN_STRING, "BGP Martian Address Intf String");
|
||||
|
||||
char *bnc_str(struct bgp_nexthop_cache *bnc, char *buf, int size)
|
||||
{
|
||||
prefix2str(&(bnc->node->p), buf, size);
|
||||
@ -205,7 +207,7 @@ static void bgp_address_hash_string_del(void *val)
|
||||
{
|
||||
char *data = val;
|
||||
|
||||
XFREE(MTYPE_TMP, data);
|
||||
XFREE(MTYPE_MARTIAN_STRING, data);
|
||||
}
|
||||
|
||||
static void *bgp_address_hash_alloc(void *p)
|
||||
@ -278,7 +280,7 @@ static void bgp_address_add(struct bgp *bgp, struct connected *ifc,
|
||||
break;
|
||||
}
|
||||
if (!node) {
|
||||
name = XSTRDUP(MTYPE_TMP, ifc->ifp->name);
|
||||
name = XSTRDUP(MTYPE_MARTIAN_STRING, ifc->ifp->name);
|
||||
listnode_add(addr->ifp_name_list, name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user