Skip to content

Commit

Permalink
custom: Destroy plugin instances on teardown instead of during property
Browse files Browse the repository at this point in the history
checking

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
  • Loading branch information
cosmo0920 committed Apr 10, 2023
1 parent 2c90848 commit 3a1b6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flb_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ int flb_custom_plugin_property_check(struct flb_custom_instance *ins,
flb_helper("try the command: %s -F %s -h\n",
config->program_name, ins->p->name);
}
flb_custom_instance_destroy(ins);
return -1;
}
}
Expand Down Expand Up @@ -262,6 +261,7 @@ int flb_custom_init_all(struct flb_config *config)
* configuration parameters are valid if the plugin is registering a config map.
*/
if (flb_custom_plugin_property_check(ins, config) == -1) {
flb_custom_instance_destroy(ins);
return -1;
}

Expand Down

0 comments on commit 3a1b6db

Please sign in to comment.