Skip to content

Commit

Permalink
lib: remove nb/yang memory cleanup when daemonizing
Browse files Browse the repository at this point in the history
We're not calling any other termination functions to free allocated
memory when daemonizing except these two. There's no reason for such an
exception, and because of these calls we have the following libyang
warnings every time FRR is started:
```
MGMTD: libyang: String "15" not freed from the dictionary, refcount 2
MGMTD: libyang: String "200" not freed from the dictionary, refcount 2
MGMTD: libyang: String "mrib-then-urib" not freed from the dictionary, refcount 2
MGMTD: libyang: String "1000" not freed from the dictionary, refcount 2
MGMTD: libyang: String "10" not freed from the dictionary, refcount 2
MGMTD: libyang: String "5" not freed from the dictionary, refcount 2
```

Remove these calls to get rid of the unnecessary warnings.

Signed-off-by: Igor Ryzhov <[email protected]>
  • Loading branch information
idryzhov committed Mar 17, 2024
1 parent 387a035 commit a564710
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/libfrr.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,6 @@ static void frr_daemonize(void)
}

close(fds[1]);
nb_terminate();
yang_terminate();
frr_daemon_wait(fds[0]);
}

Expand Down

0 comments on commit a564710

Please sign in to comment.