1. binet
  2. mana-core-athenarootcomps

Commits

bi...@4525493e-7705-40b1-a816-d608a930855b  committed 8ff422e

fixing cov-55746 (assign-op) + fixing cov-54788 (Dereference before null check) + fixing cov-54784 (mem leak)

  • Participants
  • Parent commits 2a8d6e2
  • Branches default

Comments (0)

Files changed (7)

File ChangeLog

View file
+2012-03-08  Sebastien Binet  <binet@voatlas51.cern.ch>
+
+	* tagging AthenaRootComps-00-10-02
+	* fixing cov-55746 (assign-op)
+	* fixing cov-54788 (Dereference before null check)
+	* fixing cov-54784 (mem leak)
+	* M src/TTreeEventContext.cxx
+	* M src/TTreeEventContext.h
+	* M src/RootNtupleEventSelector.cxx
+	* M src/TTreeEventSelector.cxx
+	* M src/RootConnection.cxx
+
 2012-03-07  Sebastien Binet  <binet@voatlas51.cern.ch>
 
 	* tagging AthenaRootComps-00-10-01

File src/RootConnection.cxx

View file
       m_branch->SetCompressionLevel(level);
 
       m_descr.insert(std::make_pair(m_branch, brdescr));
+    } else {
+      delete brdescr; brdescr = NULL;
     }
   }
   if (m_branch == 0) {

File src/RootNtupleEventSelector.cxx

View file
   for (Int_t i = 0; i < leaves->GetEntries(); ++i) {
     TLeaf *leaf = (TLeaf *)leaves->At(i);
     TBranch *branch = leaf->GetBranch();
-    if (leaf) {
+    if (branch) {
       
       CLID id = 0;
       const void* value_ptr = m_tuple;

File src/TTreeEventContext.cxx

View file
   m_selector( ctxt.m_selector )
 {}
 
+TTreeEventContext& 
+TTreeEventContext::operator=(const TTreeEventContext& rhs)
+{
+  if (this == &rhs) {
+    return *this;
+  }
+  m_selector = rhs.m_selector;
+  return *this;
+}
+
 // Destructor
 ///////////////
 TTreeEventContext::~TTreeEventContext()

File src/TTreeEventContext.h

View file
   /// copy constructor
   TTreeEventContext( const TTreeEventContext& ctxt );
 
+  /// assignment operator
+  TTreeEventContext& operator=(const TTreeEventContext& rhs);
+
   /// Destructor: 
   virtual ~TTreeEventContext(); 
 

File src/TTreeEventSelector.cxx

View file
   for (Int_t i = 0; i < leaves->GetEntries(); ++i) {
     TLeaf *leaf = (TLeaf *)leaves->At(i);
     TBranch *branch = leaf->GetBranch();
-    if (leaf) {
+    if (branch) {
       
       CLID id = 0;
       const void* value_ptr = m_tuple;

File test/AthenaRootComps.xml

View file
 
    <TEST name="athenarootcomps.variable_shape" type="script" suite="athenarootcomps">
       <package_atn>Control/AthenaRootComps</package_atn>
-      <options_atn>run_test_athena_ntuple_dumper.sh</options_atn>
+      <options_atn>run_test_athena_variable_shape_ntuple.sh</options_atn>
       <timelimit>30</timelimit>
       <author> Sebastien Binet </author>
       <mailto> binet@cern.ch </mailto>