summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-06 10:18:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-06 11:26:37 +0000
commitc05373e331a0224db0cdf4de809c56bc001490b2 (patch)
treeb4270f976109b87163f40cd737a9cd44f9588578 /sot
parent70143dc4a366fd84d2718769f39c1015a3c199ec (diff)
valgrind: fix minor leak
Diffstat (limited to 'sot')
-rw-r--r--sot/source/base/factory.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index b9e29e510cbe..4608cd19fe6c 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -57,7 +57,15 @@ SotData_Impl::SotData_Impl()
SotData_Impl::~SotData_Impl()
{
- delete pDataFlavorList;
+ if (pDataFlavorList)
+ {
+ for( tDataFlavorList::iterator aI = pDataFlavorList->begin(),
+ aEnd = pDataFlavorList->end(); aI != aEnd; ++aI)
+ {
+ delete *aI;
+ }
+ delete pDataFlavorList;
+ }
delete pFactoryList;
}