Skip to content

Commit 92f31cd

Browse files
pwhelanedsiper
authored andcommitted
tests/in_syslog: avoid calling test_ctx_destroy (and flb_stop) when testing an invalid mode.
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
1 parent 4e92df5 commit 92f31cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/runtime/in_syslog.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,9 @@ void flb_test_syslog_unknown_mode()
540540
exit(EXIT_FAILURE);
541541
}
542542

543-
test_ctx_destroy(ctx);
543+
/* free ctx directly to avoid calling flb_stop */
544+
flb_destroy(ctx->flb);
545+
flb_free(ctx);
544546
}
545547

546548
void flb_test_syslog_unix_perm()

0 commit comments

Comments
 (0)