EclCpGridManager: do not delete unintialized pointers

this was found using GCC-7's address sanitizer. I suspect that this
did not surface earlier (i.e., with valgrind), because newly allocated
memory gets initialized to zero by the operating system, so the value
of the pointer was zero and the delete operator did what was right by
coincidence. the new asan seems to initialize memory randomly, though.
This commit is contained in:
Andreas Lauser 2017-04-20 11:05:31 +02:00
parent 96869b6a2f
commit 5951b2f64c

View File

@ -248,6 +248,8 @@ protected:
// equilGrid_being a shallow copy only the global view.
equilGrid_ = new Dune::CpGrid(*grid_);
equilCartesianIndexMapper_ = new CartesianIndexMapper(*equilGrid_);
globalTrans_ = nullptr;
}
Grid* grid_;