summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2023-05-03 17:02:58 -0300
committerRenato Westphal <renato@opensourcerouting.org>2023-05-03 17:02:58 -0300
commit2da9c4c20696c6d4f1767e48ce758b339a7ff6fa (patch)
treeb3f92e4c28563af1c79bb674397f50f20358d29b /ripd
parentbf384bbc90017d4b9f3aa3448a4665ae0aafb4d7 (diff)
ripd: use correct memory type when freeing BFD profile
Fixes #13415. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_bfd.c2
-rw-r--r--ripd/rip_bfd.h2
-rw-r--r--ripd/rip_interface.c3
-rw-r--r--ripd/rip_nb_config.c2
4 files changed, 6 insertions, 3 deletions
diff --git a/ripd/rip_bfd.c b/ripd/rip_bfd.c
index ac5035f547..b59db11a30 100644
--- a/ripd/rip_bfd.c
+++ b/ripd/rip_bfd.c
@@ -13,6 +13,8 @@
#include "ripd/rip_bfd.h"
#include "ripd/rip_debug.h"
+DEFINE_MTYPE(RIPD, RIP_BFD_PROFILE, "RIP BFD profile name");
+
extern struct zclient *zclient;
static const char *rip_bfd_interface_profile(struct rip_interface *ri)
diff --git a/ripd/rip_bfd.h b/ripd/rip_bfd.h
index d49ca15153..7621498b15 100644
--- a/ripd/rip_bfd.h
+++ b/ripd/rip_bfd.h
@@ -9,6 +9,8 @@
#include "frrevent.h"
+DECLARE_MTYPE(RIP_BFD_PROFILE);
+
struct rip;
struct rip_interface;
struct rip_peer;
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 9f1e2d86bf..b58015a67d 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -25,6 +25,7 @@
#include "zebra/connected.h"
#include "ripd/ripd.h"
+#include "ripd/rip_bfd.h"
#include "ripd/rip_debug.h"
#include "ripd/rip_interface.h"
@@ -457,7 +458,7 @@ static void rip_interface_reset(struct rip_interface *ri)
ri->sent_updates = 0;
ri->passive = 0;
- XFREE(MTYPE_TMP, ri->bfd.profile);
+ XFREE(MTYPE_RIP_BFD_PROFILE, ri->bfd.profile);
rip_interface_clean(ri);
}
diff --git a/ripd/rip_nb_config.c b/ripd/rip_nb_config.c
index 8fe34705ca..5c7bd0fb86 100644
--- a/ripd/rip_nb_config.c
+++ b/ripd/rip_nb_config.c
@@ -25,8 +25,6 @@
#include "ripd/rip_interface.h"
#include "ripd/rip_bfd.h"
-DEFINE_MTYPE_STATIC(RIPD, RIP_BFD_PROFILE, "RIP BFD profile name");
-
/*
* XPath: /frr-ripd:ripd/instance
*/