summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-09-19 11:35:43 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-09-19 11:35:43 -0400
commit8e59a4027f2302b79fe2a6f860000267e09f7030 (patch)
treeb3139a6f48e10aa67330dba3e41d32dc6dd8169d /zebra/interface.c
parent71974bf5612447abbb14971752217e2cf7ee7934 (diff)
zebra: Use actual memory type for zebra info pointer
Use MTYPE_ZINFO for the `struct zebra_if` data structure instead of using MTYPE_TMP. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 131b8598b0..95a8bd870b 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -51,6 +51,8 @@
#include "zebra/zebra_vxlan.h"
#include "zebra/zebra_errors.h"
+DEFINE_MTYPE_STATIC(ZEBRA, ZINFO, "Zebra Interface Information")
+
#define ZEBRA_PTM_SUPPORT
DEFINE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
@@ -99,7 +101,7 @@ static int if_zebra_new_hook(struct interface *ifp)
{
struct zebra_if *zebra_if;
- zebra_if = XCALLOC(MTYPE_TMP, sizeof(struct zebra_if));
+ zebra_if = XCALLOC(MTYPE_ZINFO, sizeof(struct zebra_if));
zebra_if->multicast = IF_ZEBRA_MULTICAST_UNSPEC;
zebra_if->shutdown = IF_ZEBRA_SHUTDOWN_OFF;
@@ -177,7 +179,7 @@ static int if_zebra_delete_hook(struct interface *ifp)
THREAD_OFF(zebra_if->speed_update);
- XFREE(MTYPE_TMP, zebra_if);
+ XFREE(MTYPE_ZINFO, zebra_if);
}
return 0;