From 4e4e81fa8e9a6101f06508a26e17d95904fa2f52 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 10 Mar 2013 22:29:25 +0000 Subject: [PATCH] fixed uninitialized memory read in debug statement git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6203 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/ft/ftchunkmap.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/ft/ftchunkmap.cc b/libretroshare/src/ft/ftchunkmap.cc index b6ddcd4ec..26447e0e9 100644 --- a/libretroshare/src/ft/ftchunkmap.cc +++ b/libretroshare/src/ft/ftchunkmap.cc @@ -352,12 +352,12 @@ bool ChunkMap::getDataChunk(const std::string& peer_id,uint32_t size_hint,ftChun chunk.peer_id = peer_id ; - if(it->second.empty()) - _active_chunks_feed.erase(it) ; - #ifdef DEBUG_FTCHUNK std::cout << "*** ChunkMap::getDataChunk: returning slice " << chunk << " for peer " << it->first << std::endl ; #endif + if(it->second.empty()) + _active_chunks_feed.erase(it) ; + return true ; }