Skip to content

Commit 7445e38

Browse files
authored
upstream: add null check for stream cleanup
1 parent 137f9f0 commit 7445e38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/flb_upstream.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,11 @@ int flb_upstream_destroy(struct flb_upstream *u)
680680
flb_free(u->proxied_host);
681681
flb_free(u->proxy_username);
682682
flb_free(u->proxy_password);
683-
mk_list_del(&u->base._head);
683+
684+
if (mk_list_is_set(&u->base._head) == 0) {
685+
mk_list_del(&u->base._head);
686+
}
687+
684688
flb_free(u);
685689

686690
return 0;

0 commit comments

Comments
 (0)