[MONGOCRYPT-205] Fix potential leaks caught with BSON_MEMCHECK Created: 07/Nov/19  Updated: 28/Oct/23  Resolved: 07/Nov/19

Status: Closed
Project: Libmongocrypt
Component/s: C library
Affects Version/s: None
Fix Version/s: 1.0.0-rc2

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

During the C driver implementation (CDRIVER-2875), some potential leaks were discovered when using libmongocrypt against libbson built with the BSON_MEMCHECK flag.

This flag makes it so any usage of a bson_t heap allocates (whereas normally, heap allocation only occurs when the data exceeds the stack allocated size). So this caught a couple instances of where we would leak if the document being used was too large.



 Comments   
Comment by Githook User [ 07/Nov/19 ]

Author:

{'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com'}

Message: MONGOCRYPT-205 fix BSON_MEMCHECK leaks
Branch: master
https://github.com/mongodb/libmongocrypt/commit/4c63ea056f44c1c906f62a492a3e1e0ea0f6944f

Generated at Thu Feb 08 09:08:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.