Skip to content

Commit a3555c8

Browse files
xiazhveraTingDaoK
andauthored
Fix: release alpn string before set for tls_ctx_options (#588)
* release alpn string before set * Update source/tls_channel_handler.c Co-authored-by: Dengke Tang <[email protected]> * clang-format --------- Co-authored-by: Dengke Tang <[email protected]>
1 parent f7bc831 commit a3555c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/tls_channel_handler.c

+2
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,8 @@ int aws_tls_ctx_options_init_default_server(
441441
}
442442

443443
int aws_tls_ctx_options_set_alpn_list(struct aws_tls_ctx_options *options, const char *alpn_list) {
444+
aws_string_destroy(options->alpn_list);
445+
444446
options->alpn_list = aws_string_new_from_c_str(options->allocator, alpn_list);
445447
if (!options->alpn_list) {
446448
return AWS_OP_ERR;

0 commit comments

Comments
 (0)