Skip to content

Commit

Permalink
out_gelf: check NULL context on exit
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and edsiper committed Dec 12, 2021
1 parent 4e75acd commit dcb7fda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/out_gelf/gelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ static int cb_gelf_exit(void *data, struct flb_config *config)
{
struct flb_out_gelf_config *ctx = data;

if (ctx == NULL) {
return 0;
}

if (ctx->u) {
flb_upstream_destroy(ctx->u);
}
Expand Down

0 comments on commit dcb7fda

Please sign in to comment.