From 72033c0efad3840922dcc3b5fb33ea3e1a05d263 Mon Sep 17 00:00:00 2001 From: electron128 Date: Wed, 17 Jun 2015 09:21:27 +0000 Subject: [PATCH] fixed memory leak in FileIndexStore git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8508 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/fistore.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/dbase/fistore.cc b/libretroshare/src/dbase/fistore.cc index e413f4c09..00d70a214 100644 --- a/libretroshare/src/dbase/fistore.cc +++ b/libretroshare/src/dbase/fistore.cc @@ -84,10 +84,6 @@ int FileIndexStore::loadCache(const RsCacheData &data) //delete fi; } - /* load Cache */ - - FileIndex *finew = new FileIndex(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 @@ -95,6 +91,9 @@ int FileIndexStore::loadCache(const RsCacheData &data) // at next restart. // + /* load Cache */ + FileIndex *finew = new FileIndex(data.pid); + if (finew->loadIndex(data.path + '/' + data.name, data.hash, data.size)) { #ifdef FIS_DEBUG2