util: Fix incorrect iteration over entries in InMemoryStorage
Change-Id: I975b1160570ccf6f1d9f46b0e04bc6f5d04b4675
Refs: #2301, #2149
diff --git a/src/util/in-memory-storage.hpp b/src/util/in-memory-storage.hpp
index b9fb9da..9bec775 100644
--- a/src/util/in-memory-storage.hpp
+++ b/src/util/in-memory-storage.hpp
@@ -270,9 +270,10 @@
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
/** @brief free in-memory storage entries by an iterator pointing to that entry.
- */
- void
- freeEntry(Cache::index<byFullName>::type::iterator it);
+ @return An iterator pointing to the element that followed the last element erased.
+ */
+ Cache::iterator
+ freeEntry(Cache::iterator it);
/** @brief Implements child selector (leftmost, rightmost, undeclared).
* Operates on the first layer of a skip list.