Skip to content

Commit 5e6b65f

Browse files
nigels-comedsiper
authored andcommitted
output: fixup for SDS alloc/free matching for TLS parameters (#1544)
Signed-off-by: Nigel Stewart <[email protected]>
1 parent dd436df commit 5e6b65f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/flb_output.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,19 @@ static void flb_output_free_properties(struct flb_output_instance *ins)
8484

8585
#ifdef FLB_HAVE_TLS
8686
if (ins->tls_ca_path) {
87-
flb_free(ins->tls_ca_path);
87+
flb_sds_destroy(ins->tls_ca_path);
8888
}
8989
if (ins->tls_ca_file) {
90-
flb_free(ins->tls_ca_file);
90+
flb_sds_destroy(ins->tls_ca_file);
9191
}
9292
if (ins->tls_crt_file) {
93-
flb_free(ins->tls_crt_file);
93+
flb_sds_destroy(ins->tls_crt_file);
9494
}
9595
if (ins->tls_key_file) {
96-
flb_free(ins->tls_key_file);
96+
flb_sds_destroy(ins->tls_key_file);
9797
}
9898
if (ins->tls_key_passwd) {
99-
flb_free(ins->tls_key_passwd);
99+
flb_sds_destroy(ins->tls_key_passwd);
100100
}
101101
#endif
102102
}
@@ -404,7 +404,7 @@ int flb_output_set_property(struct flb_output_instance *out,
404404
if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "on") == 0) {
405405
if ((out->flags & FLB_IO_TLS) == 0) {
406406
flb_error("[config] %s don't support TLS", out->name);
407-
flb_free(tmp);
407+
flb_sds_destroy(tmp);
408408
return -1;
409409
}
410410

0 commit comments

Comments
 (0)