From bcd83686c3daed38974d1f9b533c07d35c5a7476 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 3 Nov 2014 22:16:51 +0000 Subject: Various small fixes and cleanups, new is_prime util --- src/lib/alloc/locking_allocator/locking_allocator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/alloc/locking_allocator') diff --git a/src/lib/alloc/locking_allocator/locking_allocator.cpp b/src/lib/alloc/locking_allocator/locking_allocator.cpp index 4b66ea018..9ea1235e9 100644 --- a/src/lib/alloc/locking_allocator/locking_allocator.cpp +++ b/src/lib/alloc/locking_allocator/locking_allocator.cpp @@ -158,6 +158,12 @@ bool mlock_allocator::deallocate(void* p, size_t num_elems, size_t elem_size) if(!m_pool) return false; + /* + We do not have to zero the memory here, as + secure_allocator::deallocate does that for all arguments before + invoking the deallocator (us or delete[]) + */ + size_t n = num_elems * elem_size; /* -- cgit v1.2.3