mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-23 01:36:25 -06:00
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:
parent
96869b6a2f
commit
5951b2f64c
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user