]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: cleanup red-herring memleaks in parent of daemonizing fork 11425/head
authorChristian Hopps <chopps@labn.net>
Fri, 17 Jun 2022 06:04:51 +0000 (02:04 -0400)
committerChristian Hopps <chopps@labn.net>
Fri, 17 Jun 2022 06:14:30 +0000 (02:14 -0400)
- 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>
lib/libfrr.c

index 042c9d370491569108c03f893df03bfcc1612ce3..f5aecd9f75a3ec4c14260661a94cb56a26f5cdf0 100644 (file)
@@ -963,6 +963,8 @@ static void frr_daemonize(void)
        }
 
        close(fds[1]);
+       nb_terminate();
+       yang_terminate();
        frr_daemon_wait(fds[0]);
 }