Skip to content
  • Mauritz Sundell's avatar
    18bfbc75
    Bug#28264144 ASAN DIRECT LEAK IN NDB_IMPORT AND TESTS: NDBIMPORTUTIL-T NDBIMPORTCSV-T · 18bfbc75
    Mauritz Sundell authored
    Removing leak of NdbImportUtil::RangeList object by making it a direct
    member of NdbImportUtil instead of allocate it separately.
    
    Problem
    =======
    In the constructor of NdbImportUtil the allocation of an RangeList object
    into c_range_free is done.
    And there are no code ever deleting the object.
    
      NdbImportUtil::NdbImportUtil() :
        m_util(*this),
        c_stats(*this)
      {
        ...
        c_blobs_free = new BlobList;
        c_ranges_free = new RangeList;  <--- direct leak reported
        add_pseudo_tables();
      }
    
    Fix
    ===
    Change type of c_ranges_free in NdbImportUtil from RangeList pointer to
    plain RangeList and remove explicit new of RangeList.
    18bfbc75
    Bug#28264144 ASAN DIRECT LEAK IN NDB_IMPORT AND TESTS: NDBIMPORTUTIL-T NDBIMPORTCSV-T
    Mauritz Sundell authored
    Removing leak of NdbImportUtil::RangeList object by making it a direct
    member of NdbImportUtil instead of allocate it separately.
    
    Problem
    =======
    In the constructor of NdbImportUtil the allocation of an RangeList object
    into c_range_free is done.
    And there are no code ever deleting the object.
    
      NdbImportUtil::NdbImportUtil() :
        m_util(*this),
        c_stats(*this)
      {
        ...
        c_blobs_free = new BlobList;
        c_ranges_free = new RangeList;  <--- direct leak reported
        add_pseudo_tables();
      }
    
    Fix
    ===
    Change type of c_ranges_free in NdbImportUtil from RangeList pointer to
    plain RangeList and remove explicit new of RangeList.
Loading