Skip to content

Commit

Permalink
flb_upstream_node: fix tls free twice
Browse files Browse the repository at this point in the history
  • Loading branch information
papigers committed Jun 27, 2022
1 parent c16f779 commit 45c9e95
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/flb_upstream_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ void flb_upstream_node_destroy(struct flb_upstream_node *node)
flb_sds_destroy(node->host);
flb_sds_destroy(node->port);

flb_hash_destroy(node->ht);
if (node->u) {
flb_upstream_destroy(node->u);
}

#ifdef FLB_HAVE_TLS
flb_sds_destroy(node->tls_ca_path);
flb_sds_destroy(node->tls_ca_file);
Expand All @@ -200,11 +205,6 @@ void flb_upstream_node_destroy(struct flb_upstream_node *node)
}
#endif

flb_hash_destroy(node->ht);
if (node->u) {
flb_upstream_destroy(node->u);
}

/* note: node link must be handled by the caller before this call */
flb_free(node);
}

0 comments on commit 45c9e95

Please sign in to comment.