From f4e318f53d063fc20e20e0ededdd0a496f9b8a9d Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Thu, 26 Sep 2024 16:07:57 -0300 Subject: [PATCH] reload: do not call flb_stop when flb_start fails to avoid crash on RHEL/CentOS. Signed-off-by: Phillip Whelan --- src/flb_reload.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/flb_reload.c b/src/flb_reload.c index b66a4c80b3b..2f156bfdcf2 100644 --- a/src/flb_reload.c +++ b/src/flb_reload.c @@ -475,7 +475,6 @@ int flb_reload(flb_ctx_t *ctx, struct flb_cf *cf_opts) flb_sds_destroy(file); } flb_cf_destroy(new_cf); - flb_stop(new_ctx); flb_destroy(new_ctx); flb_error("[reload] reloaded config is invalid. Reloading is halted"); @@ -488,7 +487,6 @@ int flb_reload(flb_ctx_t *ctx, struct flb_cf *cf_opts) if (ret != 0) { flb_sds_destroy(file); flb_cf_destroy(new_cf); - flb_stop(new_ctx); flb_destroy(new_ctx); flb_error("[reload] reloaded config format is invalid. Reloading is halted"); @@ -501,7 +499,6 @@ int flb_reload(flb_ctx_t *ctx, struct flb_cf *cf_opts) if (ret != 0) { flb_sds_destroy(file); flb_cf_destroy(new_cf); - flb_stop(new_ctx); flb_destroy(new_ctx); flb_error("[reload] reloaded config is invalid. Reloading is halted"); @@ -530,7 +527,6 @@ int flb_reload(flb_ctx_t *ctx, struct flb_cf *cf_opts) ret = flb_start(new_ctx); if (ret != 0) { - flb_stop(new_ctx); flb_destroy(new_ctx); flb_error("[reload] loaded configuration contains error(s). Reloading is aborted");