Skip to content

Commit

Permalink
* FIX [conf] add conf_parquet_destroy function.
Browse files Browse the repository at this point in the history
Signed-off-by: xinyi-xs <lihj@emqx.io>
  • Loading branch information
xinyi-xs authored and JaylinYu committed Aug 12, 2024
1 parent 970d96d commit 3104b16
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/supplemental/nanolib/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4012,6 +4012,19 @@ conf_tlslist_destroy(conf_tls_list *tlslist)
tlslist->nodes = NULL;
}
}
conf_parquet_destroy(conf_parquet *parquet)
{
if (parquet) {
nng_strfree(parquet->dir);
nng_strfree(parquet->file_name_prefix);

if (parquet->encryption.enable) {
nng_strfree(parquet->encryption.key);
nng_strfree(parquet->encryption.key_id);
}
}

}

void
conf_fini(conf *nanomq_conf)
Expand Down Expand Up @@ -4049,5 +4062,8 @@ conf_fini(conf *nanomq_conf)
conf_tcplist_destroy(&nanomq_conf->tcp_list);
conf_tlslist_destroy(&nanomq_conf->tls_list);

#if defined(SUPP_PARQUET)
conf_parquet_destroy(&nanomq_conf->parquet);
#endif
free(nanomq_conf);
}

0 comments on commit 3104b16

Please sign in to comment.