[CDRIVER-2336] Leak in _mongoc_cyrus_set_mechanism Created: 31/Oct/17  Updated: 28/Oct/23  Resolved: 20/Nov/17

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.9.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Reading the code, it appears that _mongoc_cyrus_set_mechanism constructs a string of supported auth mechanisms and then calls:

bson_string_free (str, 0);

That's passing 0 as the "free_segment" argument, so the character buffer is not freed.



 Comments   
Comment by Githook User [ 20/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2336 leak in _mongoc_cyrus_set_mechanism
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0ed1330c9112e6d06d32234a4abd91e52ceca5f7

Generated at Wed Feb 07 21:14:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.