Skip to content

Commit 538baad

Browse files
cosmo0920edsiper
authored andcommitted
plugins: Process cb_destroy callbacks if assigned for custom plugins
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 5d847e7 commit 538baad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/fluent-bit/flb_plugins.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ void flb_plugins_unregister(struct flb_config *config)
6464

6565
mk_list_foreach_safe(head, tmp, &config->custom_plugins) {
6666
custom = mk_list_entry(head, struct flb_custom_plugin, _head);
67+
if(custom->cb_destroy) {
68+
custom->cb_destroy(custom);
69+
}
6770
mk_list_del(&custom->_head);
6871
flb_free(custom);
6972
}

0 commit comments

Comments
 (0)