fixed memory leak in FileIndexStore

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8508 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-06-17 09:21:27 +00:00
parent e5425f31dc
commit 72033c0efa

View File

@ -84,10 +84,6 @@ int FileIndexStore::loadCache(const RsCacheData &data)
//delete fi; //delete fi;
} }
/* load Cache */
FileIndex *finew = new FileIndex(data.pid);
if(mPeerMgr->isFriend(data.pid)) if(mPeerMgr->isFriend(data.pid))
{ {
// We discard file lists from non friends. This is the place to remove file lists of deleted friends // We discard file lists from non friends. This is the place to remove file lists of deleted friends
@ -95,6 +91,9 @@ int FileIndexStore::loadCache(const RsCacheData &data)
// at next restart. // at next restart.
// //
/* load Cache */
FileIndex *finew = new FileIndex(data.pid);
if (finew->loadIndex(data.path + '/' + data.name, data.hash, data.size)) if (finew->loadIndex(data.path + '/' + data.name, data.hash, data.size))
{ {
#ifdef FIS_DEBUG2 #ifdef FIS_DEBUG2