[CDRIVER-3822] Coverity analysis defect 116745: Resource leak Created: 07/Dec/20  Updated: 27/Oct/23  Resolved: 02/Feb/21

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Kevin Albertson
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Resource leak

The system resource will not be reclaimed and reused, reducing the future availability of the resource. Leak of memory or pointers to system resources
/src/libmongoc/tests/unified/runner.c:640: RESOURCE_LEAK 116745 Assigning: "db" = storage returned from "mongoc_client_get_database(test_runner->internal_client, database_name)".
/src/libmongoc/tests/unified/runner.c:658: RESOURCE_LEAK 116745 Variable "db" going out of scope leaks the storage it points to.



 Comments   
Comment by Kevin Albertson [ 02/Feb/21 ]

Fixed in CDRIVER-3422.

Comment by Coverity Collector User [ 07/Dec/20 ]

A new defect has been detected and assigned to kevin.albertson in Coverity Connect.
http://coverity.mongodb.com/query/defects.htm?project=C+Driver&cid=116745
The defect was flagged by checker RESOURCE_LEAK in
file /src/libmongoc/tests/unified/runner.c
function test_setup_initial_data
and this ticket was created by kevin.albertson

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