Skip to content

Commit

Permalink
Fix NULL config clean-up (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 authored Jan 29, 2024
1 parent 0b03c30 commit 4c65ce5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/s2n/s2n_tls_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,8 +1312,9 @@ struct aws_channel_handler *aws_tls_server_handler_new(

static void s_s2n_ctx_destroy(struct s2n_ctx *s2n_ctx) {
if (s2n_ctx != NULL) {
s2n_config_free(s2n_ctx->s2n_config);

if (s2n_ctx->s2n_config) {
s2n_config_free(s2n_ctx->s2n_config);
}
if (s2n_ctx->custom_cert_chain_and_key) {
s2n_cert_chain_and_key_free(s2n_ctx->custom_cert_chain_and_key);
}
Expand Down

0 comments on commit 4c65ce5

Please sign in to comment.