summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2022-06-17 02:04:51 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2022-06-19 09:50:09 +0000
commitb2787e4711b39b1b899ed0f56bfaff8fca716899 (patch)
tree5ceb9a3b86e613deb45a55de45b3babaf1369626
parent17dbb034dd0ae66d16cb305ebaeec76c754bbc8a (diff)
lib: cleanup red-herring memleaks in parent of daemonizing fork
- The parent of the daemonizing fork reports memleaks for the early northbound allocations (libyang). If these were real memleaks these would show up in the child as well; however, ignoring all memleaks in the parent of the fork is too hard a sale. Instead, spend some CPU cycles cleaning up the allocations in the parent after the fork and immeidatley prior to exiting the parent after the daemonizing fork. Signed-off-by: Christian Hopps <chopps@labn.net> (cherry picked from commit 1213e46bfd4aaf2897787b4dc03879d4d1b81fa6)
-rw-r--r--lib/libfrr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libfrr.c b/lib/libfrr.c
index 042c9d3704..f5aecd9f75 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -963,6 +963,8 @@ static void frr_daemonize(void)
}
close(fds[1]);
+ nb_terminate();
+ yang_terminate();
frr_daemon_wait(fds[0]);
}