diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2022-02-26 12:01:58 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2022-03-03 12:00:54 +0100 |
commit | 5db145717d48a6ef82890a7a314af6ef89edbc8d (patch) | |
tree | 301e287fd3abaf9176e00587a6c60fc61f9caaae /src/lib | |
parent | f535637a394eecca1af182fb09b175b53e9fbf1f (diff) | |
download | ouroboros-5db145717d48a6ef82890a7a314af6ef89edbc8d.tar.gz ouroboros-5db145717d48a6ef82890a7a314af6ef89edbc8d.zip |
lib: Check return value of rib_init
The rib_init return value wasn't checked.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dev.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index ab02a783..31941afd 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -466,11 +466,16 @@ static void init(int argc, if (strstr(argv[0], "ipcpd") == NULL) { sprintf(procstr, "proc.%d", getpid()); /* Don't bail on fail, it just won't show metrics */ - rib_init(procstr); + if (rib_init(procstr) < 0) + goto fail_rib_init; } #endif return; +#if defined PROC_FLOW_STATS + fail_rib_init: + timerwheel_fini(); +#endif fail_timerwheel: shm_flow_set_close(ai.fqset); fail_fqset: |