S3Client Uploading Leaks Memory on Windows caused by InitializeSecurityContext misuse #3021
Labels
bug
This issue is a bug.
p2
This is a standard priority issue
pending-release
This issue will be fixed by an approved PR that hasn't been released yet.
Describe the bug
Aws::S3::S3Client::PutObject leaks memory on Windows. Static funtion
s_handler_shutdown
incrt/aws-crt-cpp/crt/aws-c-io/source/windows/secure_channel_tls_handler.c
is called during uploading, downloading, listing, deleting, any move related to a network request. However, after callingInitializeSecurityContext
, current version of code has failed to call the corresponding memory release functionFreeContextBuffer
.Expected Behavior
Upload, download, list, delete files normally and don't leak memory.
Current Behavior
Memory usage increases by 200KiB per 1k call.
Reproduction Steps
Call Aws::S3::S3Client::PutObject 1k times.
Possible Solution
In
crt/aws-crt-cpp/crt/aws-c-io/source/windows/secure_channel_tls_handler.c
, fix the static functions_handler_shutdown
by addingFreeContextBuffer
correctly.Additional Information/Context
No response
AWS CPP SDK version used
1.11.314
Compiler and Version used
Visual Studio 2022
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: