From c434ed4f3815df70ca81a969a72d2992ac6307ad Mon Sep 17 00:00:00 2001 From: kakwa Date: Wed, 14 Sep 2016 20:15:18 +0200 Subject: [PATCH] exit at the first TS_RESP_CTX initialization fail --- src/lib/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/utils.c b/src/lib/utils.c index 4a83022..c9876d3 100644 --- a/src/lib/utils.c +++ b/src/lib/utils.c @@ -364,8 +364,10 @@ int set_params(rfc3161_context *ct, char *conf_file, char *conf_wd) { for (int i = 0; i < numthreads; i++) { ct->ts_ctx_pool[i].ts_ctx = create_tsctx(ct, ct->conf, TSA_SECTION, NULL); ct->ts_ctx_pool[i].available = 1; - if (ct->ts_ctx_pool[i].ts_ctx == NULL) + if (ct->ts_ctx_pool[i].ts_ctx == NULL){ ret = 0; + break; + } } // like any good daemon, return to '/' once the configuration is loaded chdir("/");