aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/secmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc/secmem.h')
-rw-r--r--src/alloc/secmem.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h
index 2552343d6..884f2ebc0 100644
--- a/src/alloc/secmem.h
+++ b/src/alloc/secmem.h
@@ -172,11 +172,12 @@ class MemoryRegion
* Copy constructor
* @param other the other region to copy
*/
- MemoryRegion(const MemoryRegion<T>& other)
+ MemoryRegion(const MemoryRegion<T>& other) :
+ buf(0),
+ used(0),
+ allocated(0),
+ alloc(other.alloc)
{
- buf = 0;
- used = allocated = 0;
- alloc = other.alloc;
resize(other.size());
copy(&other[0], other.size());
}