[CDRIVER-2932] Coverity analysis defect 101936: Resource leak Created: 24/Jan/19  Updated: 28/Oct/23  Resolved: 28/Jan/19

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

Type: Bug Priority: Trivial - P5
Reporter: Coverity Collector User Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Leak of memory or pointers to system resources

Defect 101936 (STATIC_C)
Checker RESOURCE_LEAK (subcategory none)
File: /src/libmongoc/tests/test-conveniences.c
Function match_json
/src/libmongoc/tests/test-conveniences.c, line: 642
Resource "doc ? bson_as_canonical_extended_json(doc, NULL) : "{}"" is not freed or pointed-to in "fprintf".

          fprintf (stderr,

/src/libmongoc/tests/test-conveniences.c, line: 642
Failing to save or free storage allocated by "bson_as_canonical_extended_json(doc, NULL)" leaks it.

          fprintf (stderr,



 Comments   
Comment by Kevin Albertson [ 28/Jan/19 ]

Fixed in d62b610f3d8ae3455fe54f116271deaa2d84157b (wrong ticket number in commit).

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