diff options
Diffstat (limited to 'ACE/ace/Malloc_Allocator.cpp')
-rw-r--r-- | ACE/ace/Malloc_Allocator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ACE/ace/Malloc_Allocator.cpp b/ACE/ace/Malloc_Allocator.cpp index ffb736eb782..31834e3c8fa 100644 --- a/ACE/ace/Malloc_Allocator.cpp +++ b/ACE/ace/Malloc_Allocator.cpp @@ -109,7 +109,6 @@ void * ACE_New_Allocator::malloc (size_t nbytes) { char *ptr = 0; - if (nbytes > 0) ACE_NEW_RETURN (ptr, char[nbytes], 0); return (void *) ptr; @@ -136,7 +135,11 @@ ACE_New_Allocator::calloc (size_t n_elem, size_t elem_size, char initial_value) void ACE_New_Allocator::free (void *ptr) { +#ifdef ACE_FACE_SAFETY_BASE + ACE_UNUSED_ARG (ptr); +#else delete [] (char *) ptr; +#endif } int |