From: Eduardo Ramos Testillano Date: Sat, 11 Mar 2017 21:40:56 +0000 (+0100) Subject: Fix bug when reading already freed memory X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=commitdiff_plain;h=f702d3ab031497522a26f139c5e156f7f22e8f38 Fix bug when reading already freed memory --- 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)); //------------------------------------------------------------------------------