Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added check whether the pointer passed to ::operator delete is NULL.

git-svn-id: http://svn.daimi.au.dk/svn/tpie/trunk@232 669acd26-ddd2-4139-9e68-486997aa639d
  • Loading branch information...
commit 6f962b006f655d75942af8bac224e3b7db97ccee 1 parent 80aba2a
Jan Vahrenhold authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tpie/lib/src/mm_base.cpp
View
3  tpie/lib/src/mm_base.cpp
@@ -7,7 +7,7 @@
-static char mm_base_id[] = "$Id: mm_base.cpp,v 1.2 1994-12-16 21:14:29 darrenv Exp $";
+static char mm_base_id[] = "$Id: mm_base.cpp,v 1.3 1997-10-28 20:04:44 jan Exp $";
@@ -52,6 +52,7 @@ void * operator new (size_t sz) {
}
void operator delete (void *ptr) {
+ if (!ptr) return;
if (register_new) {
MM_manager.register_deallocation(*((size_t *)
(((char *)ptr) - SIZE_SPACE)) +
Please sign in to comment.
Something went wrong with that request. Please try again.