From: Christian Hopps Date: Fri, 17 Jun 2022 06:04:51 +0000 (-0400) Subject: lib: cleanup red-herring memleaks in parent of daemonizing fork X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=757aa599ef22fa83a9e9b7c90c27e53e7d0832e5;p=mirror%2Ffrr.git 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 (cherry picked from commit 1213e46bfd4aaf2897787b4dc03879d4d1b81fa6) --- diff --git a/lib/libfrr.c b/lib/libfrr.c index 89bbe6de2e..b3b24e1d31 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -948,6 +948,8 @@ static void frr_daemonize(void) } close(fds[1]); + nb_terminate(); + yang_terminate(); frr_daemon_wait(fds[0]); }