Merge "inode2filename: Fix a use-after-free bug." into rvc-dev am: 9ba82bf571 am: 357abab0ad
Change-Id: I30e468c9b59a92cd883db53aea2d93fd17eeb0c2
diff --git a/src/inode2filename/search_directories.cc b/src/inode2filename/search_directories.cc
index 9c609ef..f450088 100644
--- a/src/inode2filename/search_directories.cc
+++ b/src/inode2filename/search_directories.cc
@@ -210,7 +210,7 @@
});
if (found != inode_list.end()) {
- const Inode& inode = found->second;
+ Inode inode = found->second;
LOG(VERBOSE) << "InodeSet:FindAndRemoveInodeInList *success* inode+device " << inode;
DCHECK_EQ(found->second, inode);
// Erase the inode from the list. This is important.