From f702d3ab031497522a26f139c5e156f7f22e8f38 Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Sat, 11 Mar 2017 22:40:56 +0100 Subject: [PATCH] Fix bug when reading already freed memory --- source/diameter/stack/Dictionary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/diameter/stack/Dictionary.cpp b/source/diameter/stack/Dictionary.cpp index e369d43..68f37c1 100644 --- a/source/diameter/stack/Dictionary.cpp +++ b/source/diameter/stack/Dictionary.cpp @@ -41,8 +41,9 @@ LOGNOTICE(\ trace += "\n";\ anna::Logger::notice(trace, ANNA_FILE_LOCATION);\ );\ +std::string name = found->getName();\ pool.erase(pool.find(found->getId()));\ -poolNames.erase(poolNames.find(found->getName())); +poolNames.erase(poolNames.find(name)); //------------------------------------------------------------------------------ -- 2.20.1