aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/alloc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-08-09 15:56:32 +0000
committerlloyd <[email protected]>2014-08-09 15:56:32 +0000
commit455bd2557cbb1343e59eefd97cb449f06a702c28 (patch)
tree4bb7de20fb10e198b57768d3dabd31ed093a95e7 /src/lib/alloc
parent28726b93b0b9ae221f54ab7cc297d09a9af6843a (diff)
Have clear_mem just be a plain memset and only call the (slow)
zero_mem just before a deallocation where we are actually at risk of the compiler eliding the writes.
Diffstat (limited to 'src/lib/alloc')
-rw-r--r--src/lib/alloc/secmem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/alloc/secmem.h b/src/lib/alloc/secmem.h
index 2f4d65f33..706ea037f 100644
--- a/src/lib/alloc/secmem.h
+++ b/src/lib/alloc/secmem.h
@@ -57,7 +57,7 @@ class secure_allocator
void deallocate(pointer p, size_type n)
{
- clear_mem(p, n);
+ zero_mem(p, n);
#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
if(mlock_allocator::instance().deallocate(p, n, sizeof(T)))