From ad4201522c221937eae8f80c3bd0a259e65822ad Mon Sep 17 00:00:00 2001 From: Rosen Matev <rosen.matev@cern.ch> Date: Tue, 23 Feb 2021 08:31:15 +0000 Subject: [PATCH] Merge branch 'fix-hlt2012-memory-problem' into 'hlt2012-patches' Fix segfault in LumiPutResult when processed by genconf See merge request lhcb/Hlt!649 (cherry picked from commit 42c549d00f5ef5cb5e05129b9e1935e7b13d26c5) 8e68bdbc Fix segfault in LumiPutResult when processed by genconf --- Hlt/HltLuminosity/src/LumiPutResult.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Hlt/HltLuminosity/src/LumiPutResult.cpp b/Hlt/HltLuminosity/src/LumiPutResult.cpp index f8f910d42..9eeb698b7 100755 --- a/Hlt/HltLuminosity/src/LumiPutResult.cpp +++ b/Hlt/HltLuminosity/src/LumiPutResult.cpp @@ -37,7 +37,7 @@ DECLARE_ALGORITHM_FACTORY( LumiPutResult ); //============================================================================= LumiPutResult::LumiPutResult( const std::string& name, ISvcLocator* pSvcLocator) - : GaudiAlgorithm ( name , pSvcLocator ) + : GaudiAlgorithm ( name , pSvcLocator ), m_means(NULL), m_thresholds(NULL), m_infoKeys(NULL) { declareProperty( "InputContainer", m_InputContainerName = LHCb::HltLumiResultLocation::Default ); } @@ -52,9 +52,9 @@ LumiPutResult::~LumiPutResult() { // how???? // then release storage - delete[] m_means; - delete[] m_thresholds; - delete[] m_infoKeys; + if ( m_means ) delete[] m_means; + if ( m_thresholds ) delete[] m_thresholds; + if ( m_infoKeys ) delete[] m_infoKeys; } //============================================================================= -- GitLab