Fix memory leak in Base64Encode (#2441)

* Fix memory leak

* cl
This commit is contained in:
JinmingHu 2021-06-10 10:02:01 +08:00 committed by GitHub
parent d5d585500d
commit 325466ecae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,9 @@
## 1.1.0-beta.1 (Unreleased)
### Bug Fixes
- Fixed a memory leak issue in `Base64Encode()`.
## 1.0.0 (2021-06-04)

View File

@ -68,7 +68,6 @@ namespace Azure { namespace Core {
BUF_MEM* bufferPtr;
BIO_get_mem_ptr(bio, &bufferPtr);
std::string toReturn(bufferPtr->data, bufferPtr->length);
BIO_set_close(bio, BIO_NOCLOSE);
BIO_free_all(bio);
return toReturn;