Skip to content
Snippets Groups Projects
Commit e35f30cc authored by Markus Blatt's avatar Markus Blatt
Browse files

[poolallocator] Throw bad_alloc when freeing null pointer

parent c504cb3b
No related branches found
No related tags found
No related merge requests found
......@@ -539,8 +539,12 @@ namespace Dune
freed->next_ = head_;
head_ = freed;
//--allocated_;
}else
}
else
{
std::cerr<< "Tried to free null pointer! "<<b<<std::endl;
throw std::bad_alloc();
}
}
template<class T, std::size_t S>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment