Fix bug when reading already freed memory
authorEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Sat, 11 Mar 2017 21:40:56 +0000 (22:40 +0100)
committerEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Sat, 11 Mar 2017 21:40:56 +0000 (22:40 +0100)
source/diameter/stack/Dictionary.cpp

index e369d43..68f37c1 100644 (file)
@@ -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));
 
 
 //------------------------------------------------------------------------------