diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-06 10:18:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-06 11:26:37 +0000 |
commit | c05373e331a0224db0cdf4de809c56bc001490b2 (patch) | |
tree | b4270f976109b87163f40cd737a9cd44f9588578 /sot | |
parent | 70143dc4a366fd84d2718769f39c1015a3c199ec (diff) |
valgrind: fix minor leak
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/base/factory.cxx | 10 |
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; } |