File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1450,18 +1450,15 @@ static struct aws_tls_ctx *s_tls_ctx_new(
14501450 struct aws_allocator * alloc ,
14511451 const struct aws_tls_ctx_options * options ,
14521452 s2n_mode mode ) {
1453- struct s2n_ctx * s2n_ctx = aws_mem_calloc (alloc , 1 , sizeof (struct s2n_ctx ));
1454-
1455- if (!s2n_ctx ) {
1456- return NULL ;
1457- }
14581453
14591454 if (!aws_tls_is_cipher_pref_supported (options -> cipher_pref )) {
14601455 aws_raise_error (AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED );
14611456 AWS_LOGF_ERROR (AWS_LS_IO_TLS , "static: TLS Cipher Preference is not supported: %d." , options -> cipher_pref );
14621457 return NULL ;
14631458 }
14641459
1460+ struct s2n_ctx * s2n_ctx = aws_mem_calloc (alloc , 1 , sizeof (struct s2n_ctx ));
1461+
14651462 s2n_ctx -> ctx .alloc = alloc ;
14661463 s2n_ctx -> ctx .impl = s2n_ctx ;
14671464 aws_ref_count_init (& s2n_ctx -> ctx .ref_count , s2n_ctx , (aws_simple_completion_callback * )s_s2n_ctx_destroy );
You can’t perform that action at this time.
0 commit comments