Fix the SEGV exception

xyz.openbmc_project.Dump.Manager.service: Main process exited, code=dumped, status=11/SEGV
xyz.openbmc_project.Dump.Manager.service: Failed with result 'core-dump'.

During the process of deleting all dump entries,
the operation on the iterator may lead to segv fault
because the content that the iterator is pointing to has been freed.

We can move the iterator to the next before deleting the entry.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Change-Id: I973e3d3f4df9dc52ee40423553c395e32d3b8d31
diff --git a/dump_manager.cpp b/dump_manager.cpp
index 21fca8a..9a8d0f4 100644
--- a/dump_manager.cpp
+++ b/dump_manager.cpp
@@ -136,8 +136,8 @@
     while (iter != entries.end())
     {
         auto& entry = iter->second;
-        entry->delete_();
         ++iter;
+        entry->delete_();
     }
 }