[Box Backup-dev] COMMIT r713 - box/chris/general/lib/backupclient
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sat, 5 Aug 2006 20:24:37 +0000 (GMT)
Author: chris
Date: 2006-08-05 20:24:34 +0000 (Sat, 05 Aug 2006)
New Revision: 713
Modified:
box/chris/general/lib/backupclient/BackupStoreDirectory.cpp
Log:
* BackupStoreDirectory.cpp
- Fixed memory leak when BackupStoreDirectory object is reused
Modified: box/chris/general/lib/backupclient/BackupStoreDirectory.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupStoreDirectory.cpp 2006-08-05 20:23:40 UTC (rev 712)
+++ box/chris/general/lib/backupclient/BackupStoreDirectory.cpp 2006-08-05 20:24:34 UTC (rev 713)
@@ -149,6 +149,11 @@
int count = ntohl(hdr.mNumEntries);
// Clear existing list
+ for(std::vector<Entry*>::iterator i = mEntries.begin();
+ i != mEntries.end(); i++)
+ {
+ delete (*i);
+ }
mEntries.clear();
// Read them in!