Skip to content

Commit

Permalink
HPCC-16438 Fix minor resource leak in configmgr reported by coverity
Browse files Browse the repository at this point in the history
HPCC-16438 Fix minor resource leak in configmgr reported by coverity

- Delete possibly previously NEW'ed var before reassignment to avoid override
- Per code review comments, no need to check if NULL before delete
- Per code review comments, use delete directive rather than function
- Add comment explaining the unusual delete for ease of maintenance

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Mar 3, 2017
1 parent 31066f6 commit f9ea54f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deployment/deployutils/wizardInputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ CInstDetails* CWizardInputs::getServerIPMap(const char* compName, const char* bu

if(m_compIpMap.find(buildSetName) != NULL)
{
delete instDetails; // Possibly previously NEW'ed, delete to avoid override
instDetails = m_compIpMap.getValue(buildSetName);

if( (instDetails->getIpAssigned()).ordinality() != numOfNodes)
Expand Down

0 comments on commit f9ea54f

Please sign in to comment.