[SERVER-19581] Coverity analysis defect 73299: Resource leak Created: 24/Jul/15  Updated: 24/Jul/15  Resolved: 24/Jul/15

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 3.1.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Andreas Nilsson
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 7 08/10/15
Participants:

 Description   

Leak of memory or pointers to system resources

Defect 73299 (STATIC_C)
Checker RESOURCE_LEAK (subcategory none)
File: /src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp
Function mongo_addWiredTigerEncryptors
/src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp, line: 244
Storage is returned from allocation function "operator new".

        mongo::ExtendedWTEncryptor* extWTEncryptor = new mongo::ExtendedWTEncryptor;

/src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp, line: 244
Assigning: "extWTEncryptor" = storage returned from "new mongo::<unnamed>::ExtendedWTEncryptor".

        mongo::ExtendedWTEncryptor* extWTEncryptor = new mongo::ExtendedWTEncryptor;

/src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp, line: 258
Variable "extWTEncryptor" going out of scope leaks the storage it points to.

        return 0;


Generated at Thu Feb 08 03:51:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.