Skip to content

Commit

Permalink
Merge pull request #14067 from avetisya/nullptr-reinitialization-fix
Browse files Browse the repository at this point in the history
Reinitializing deleted pointers to nullptr
  • Loading branch information
cmsbuild committed Apr 14, 2016
2 parents dc34dda + 96f6006 commit 7bc1699
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions HLTrigger/JSONMonitoring/plugins/HLTriggerJSONMonitoring.cc
Expand Up @@ -417,6 +417,18 @@ HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(const edm::LuminosityBl
//Note: Do not delete the iSummary pointer. The framework does something with it later on
// and deleting it results in a segmentation fault.

//Reninitalize HistoJ pointers to nullptr
iSummary->processed = nullptr;

iSummary->hltWasRun = nullptr;
iSummary->hltL1s = nullptr;
iSummary->hltPre = nullptr;
iSummary->hltAccept = nullptr;
iSummary->hltReject = nullptr;
iSummary->hltErrors = nullptr;

iSummary->hltDatasets = nullptr;

}//End globalEndLuminosityBlockSummary function


Expand Down
9 changes: 9 additions & 0 deletions HLTrigger/JSONMonitoring/plugins/L1TriggerJSONMonitoring.cc
Expand Up @@ -401,6 +401,15 @@ L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(const edm::LuminosityBl
//Note: Do not delete the iSummary pointer. The framework does something with it later on
// and deleting it results in a segmentation fault.

//Reninitalize HistoJ pointers to nullptr
iSummary->processed = nullptr;

iSummary->L1AlgoAccept = nullptr;
iSummary->L1AlgoAcceptPhysics = nullptr;
iSummary->L1AlgoAcceptCalibration = nullptr;
iSummary->L1AlgoAcceptRandom = nullptr;
iSummary->L1Global = nullptr;

}//End globalEndLuminosityBlockSummary function

void
Expand Down

0 comments on commit 7bc1699

Please sign in to comment.