diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-11-13 16:10:00 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-11-13 16:10:00 +0000 |
commit | 7a5175aedfc8bdba18ae9bc9d6322303be1aa9e5 (patch) | |
tree | 0a5e318c1339090b9cf73cbf3a14ab0f34f55738 /test/backupstore | |
parent | c26856da8e344e7ec94d55f92ed49a09f04c5769 (diff) |
Fix memory leak false alarms caused by modifying static objects (refs #3)
Diffstat (limited to 'test/backupstore')
-rw-r--r-- | test/backupstore/testbackupstore.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp index 756fb03c..840d004c 100644 --- a/test/backupstore/testbackupstore.cpp +++ b/test/backupstore/testbackupstore.cpp @@ -1926,14 +1926,19 @@ int test(int argc, const char *argv[]) // for seeing what's going on. BackupClientCryptoKeys_Setup("testfiles/bbackupd.keys"); - // encode in some filenames -- can't do static initialisation because the key won't be set up when these are initialised - for(unsigned int l = 0; l < sizeof(ens_filenames) / sizeof(ens_filenames[0]); ++l) + // encode in some filenames -- can't do static initialisation + // because the key won't be set up when these are initialised { - ens[l].fn = BackupStoreFilenameClear(ens_filenames[l]); - } - for(unsigned int l = 0; l < sizeof(uploads_filenames) / sizeof(uploads_filenames[0]); ++l) - { - uploads[l].name = BackupStoreFilenameClear(uploads_filenames[l]); + MEMLEAKFINDER_NO_LEAKS + + for(unsigned int l = 0; l < sizeof(ens_filenames) / sizeof(ens_filenames[0]); ++l) + { + ens[l].fn = BackupStoreFilenameClear(ens_filenames[l]); + } + for(unsigned int l = 0; l < sizeof(uploads_filenames) / sizeof(uploads_filenames[0]); ++l) + { + uploads[l].name = BackupStoreFilenameClear(uploads_filenames[l]); + } } // Trace errors out |