Skip to content
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...
1 parent 80aba2a commit 6f962b006f655d75942af8bac224e3b7db97ccee Jan Vahrenhold committed Oct 28, 1997
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)) +

0 comments on commit 6f962b0

Please sign in to comment.
Something went wrong with that request. Please try again.