diff options
author | Florin Coras <fcoras@cisco.com> | 2019-03-19 19:44:51 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-20 09:27:32 +0000 |
commit | d89411ef5f59b91101b0311a2dd41a3641985d1e (patch) | |
tree | 2064855771c49d8f109197c49d4f912475687276 | |
parent | e6a47cf5576c6e1dbae9e41365bbecfcf128603e (diff) |
ldp: force exit if constructor init fails
Change-Id: I0c4659b9e413cf7291ec9e3b5a67de8ad8028cd3
Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r-- | src/vcl/ldp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index af9c580a8c9..9e00d7e2668 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -2389,8 +2389,11 @@ ldp_constructor (void) { swrap_constructor (); if (ldp_init () != 0) - fprintf (stderr, "\nLDP<%d>: ERROR: ldp_constructor: failed!\n", - getpid ()); + { + fprintf (stderr, "\nLDP<%d>: ERROR: ldp_constructor: failed!\n", + getpid ()); + _exit (1); + } else if (LDP_DEBUG > 0) clib_warning ("LDP<%d>: LDP constructor: done!\n", getpid ()); } |