summaryrefslogtreecommitdiff
path: root/ndb/include/util
diff options
context:
space:
mode:
authorunknown <pekka@mysql.com>2005-03-31 16:22:46 +0200
committerunknown <pekka@mysql.com>2005-03-31 16:22:46 +0200
commit5e7c6e0e20deaf9ca734aab65b292dd6acfaa21a (patch)
tree1cec4f5cebc12f835b812011e0b441c210d3620e /ndb/include/util
parentb790a34805664e43c37d2b064722ff3ee7d79ad7 (diff)
downloadmariadb-git-5e7c6e0e20deaf9ca734aab65b292dd6acfaa21a.tar.gz
ndb - fix small memory leak
ndb/include/util/Vector.hpp: fix small memory leak ndb/src/mgmapi/mgmapi.cpp: fix small memory leak
Diffstat (limited to 'ndb/include/util')
-rw-r--r--ndb/include/util/Vector.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ndb/include/util/Vector.hpp b/ndb/include/util/Vector.hpp
index f60817dab67..480dddf8243 100644
--- a/ndb/include/util/Vector.hpp
+++ b/ndb/include/util/Vector.hpp
@@ -61,6 +61,10 @@ Vector<T>::Vector(int i){
template<class T>
Vector<T>::~Vector(){
delete[] m_items;
+ // safety for placement new usage
+ m_items = 0;
+ m_size = 0;
+ m_arraySize = 0;
}
template<class T>
@@ -174,6 +178,10 @@ MutexVector<T>::MutexVector(int i){
template<class T>
MutexVector<T>::~MutexVector(){
delete[] m_items;
+ // safety for placement new usage
+ m_items = 0;
+ m_size = 0;
+ m_arraySize = 0;
}
template<class T>