summaryrefslogtreecommitdiff
path: root/zebra/main.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-12-12 13:29:47 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-12-12 13:29:47 -0500
commit8fcacf680389778e29acf68adbec9a7021217a22 (patch)
treed96af678a6af2afc320784a59269dc6ed6de0fbc /zebra/main.c
parent9393d36690ccfff3904597eac76be59567651424 (diff)
zebra: Don't leak memory in rtadv.c code on shutdown
The adata variable was being leaked on shutdown since it was calloc'ed. There is no need to make this dynamic memory. Just choose a size and use that. Add a bit of code to ensure that if it's not large enough, it will just stop and the developer will fix it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 5dd830b542..604d8974b3 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -432,6 +432,8 @@ int main(int argc, char **argv)
zebra_vty_init();
access_list_init();
prefix_list_init();
+
+ rtadv_init();
rtadv_cmd_init();
/* PTM socket */
#ifdef ZEBRA_PTM_SUPPORT