Skip to content

Commit

Permalink
Fix Memory leak caused by redefinition (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera authored Feb 21, 2024
1 parent 58ab50f commit 105c3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/darwin/darwin_pki_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ int aws_import_public_and_private_keys_to_identity(
struct aws_pem_object *root_cert_ptr = NULL;
aws_array_list_get_at_ptr(&cert_chain_list, (void **)&root_cert_ptr, 0);
AWS_ASSERT(root_cert_ptr);
CFDataRef root_cert_data = CFDataCreate(cf_alloc, root_cert_ptr->data.buffer, root_cert_ptr->data.len);
root_cert_data = CFDataCreate(cf_alloc, root_cert_ptr->data.buffer, root_cert_ptr->data.len);
if (!root_cert_data) {
AWS_LOGF_ERROR(AWS_LS_IO_PKI, "static: failed creating root cert data.");
result = aws_raise_error(AWS_ERROR_SYS_CALL_FAILURE);
Expand Down

0 comments on commit 105c3d4

Please sign in to comment.