input: fix config reader for FLB_INPUT_NET plugins (in_forward)
@@ -208,8 +208,7 @@ int flb_input_set_property(struct flb_input_instance *in, char *k, char *v)
in->mp_buf_limit = flb_utils_size_to_bytes(tmp);
flb_free(tmp);
}
- else if (in->p->flags & FLB_INPUT_NET) {
- if (prop_key_check("listen", k, len) == 0) {
+ else if (prop_key_check("listen", k, len) == 0) {
in->host.listen = tmp;
}
else if (prop_key_check("host", k, len) == 0) {
@@ -218,10 +217,7 @@ int flb_input_set_property(struct flb_input_instance *in, char *k, char *v)
else if (prop_key_check("port", k, len) == 0) {
if (tmp) {
in->host.port = atoi(tmp);
- }
- else {
- in->host.port = 0;
- }
+ flb_free(tmp);
}
}
else {
