Commit b2ac6fc1 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

Bug correction (Mismatched free() / delete / delete []) in

import2tablesSurface.hpp line 1004
tensor.hpp line 95
parent a1c16ba2
......@@ -1001,7 +1001,7 @@ bool MeshTablesSurface<PFP>::importPlySLFgenericBin(const std::string& filename,
if (*endline == '\r') // for windows
fp.read(endline, sizeof(char)) ;
assert(*endline == '\n') ;
delete endline ;
delete[] endline ;
// Define containers
VertexAttribute<typename PFP::VEC3> positions = m_map.template getAttribute<typename PFP::VEC3, VERTEX>("position") ;
......
......@@ -92,7 +92,7 @@ Tensor<SIZE, REAL>::operator=(const Tensor& T)
{
m_order = T.m_order ;
delete(m_data) ;
delete[] m_data ;
m_data = new REAL[T.nbElem()] ;
for (unsigned int i = 0 ; i < T.nbElem() ; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment