Skip to content

Commit

Permalink
fixed memory leak in unit test. (#106)
Browse files Browse the repository at this point in the history
* fixed memory leak in unit test.
  • Loading branch information
JonathanHenson authored Feb 2, 2022
1 parent 094ea67 commit 9ab6f96
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ jobs:
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --variant=openssl --cmake-extra=-DUSE_OPENSSL=ON --cmake-extra=-DBUILD_SHARED_LIBS=ON
windows:
runs-on: windows-latest
runs-on: windows-2019
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }}
windows-vc14:
runs-on: windows-latest
runs-on: windows-2019
strategy:
matrix:
arch: [x86, x64]
Expand All @@ -120,7 +120,7 @@ jobs:
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-14
windows-shared-libs:
runs-on: windows-latest
runs-on: windows-2019
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
Expand Down
2 changes: 2 additions & 0 deletions tests/md5_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ static int s_md5_test_extra_buffer_space_fn(struct aws_allocator *allocator, voi
aws_byte_buf_clean_up(&digest_size_buf);
aws_byte_buf_clean_up(&super_size_buf);

aws_cal_library_clean_up();

return AWS_OP_SUCCESS;
}
AWS_TEST_CASE(md5_test_extra_buffer_space, s_md5_test_extra_buffer_space_fn)
2 changes: 2 additions & 0 deletions tests/sha1_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ static int s_sha1_test_extra_buffer_space_fn(struct aws_allocator *allocator, vo
aws_byte_buf_clean_up(&digest_size_buf);
aws_byte_buf_clean_up(&super_size_buf);

aws_cal_library_clean_up();

return AWS_OP_SUCCESS;
}
AWS_TEST_CASE(sha1_test_extra_buffer_space, s_sha1_test_extra_buffer_space_fn)
2 changes: 2 additions & 0 deletions tests/sha256_hmac_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ static int s_sha256_hmac_test_extra_buffer_space_fn(struct aws_allocator *alloca
aws_byte_buf_clean_up(&digest_size_buf);
aws_byte_buf_clean_up(&super_size_buf);

aws_cal_library_clean_up();

return AWS_OP_SUCCESS;
}
AWS_TEST_CASE(sha256_hmac_test_extra_buffer_space, s_sha256_hmac_test_extra_buffer_space_fn)
2 changes: 2 additions & 0 deletions tests/sha256_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ static int s_sha256_test_extra_buffer_space_fn(struct aws_allocator *allocator,
aws_byte_buf_clean_up(&digest_size_buf);
aws_byte_buf_clean_up(&super_size_buf);

aws_cal_library_clean_up();

return AWS_OP_SUCCESS;
}
AWS_TEST_CASE(sha256_test_extra_buffer_space, s_sha256_test_extra_buffer_space_fn)

0 comments on commit 9ab6f96

Please sign in to comment.