Skip to content

Commit

Permalink
Added check whether the pointer passed to ::operator delete is NULL.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.daimi.au.dk/svn/tpie/trunk@232 669acd26-ddd2-4139-9e68-486997aa639d
  • Loading branch information
Jan Vahrenhold committed Oct 28, 1997
1 parent 80aba2a commit 6f962b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tpie/lib/src/mm_base.cpp
Expand Up @@ -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 $";



Expand Down Expand Up @@ -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)) +
Expand Down

0 comments on commit 6f962b0

Please sign in to comment.