diff --git a/core/AmPlugIn.cpp b/core/AmPlugIn.cpp index f0e2be39..a28ee35c 100644 --- a/core/AmPlugIn.cpp +++ b/core/AmPlugIn.cpp @@ -584,6 +584,7 @@ int AmPlugIn::loadAppPlugIn(AmPluginFactory* f) return -1; } + inc_ref(sf); name2app.insert(std::make_pair(sf->getName(),sf)); DBG("application '%s' loaded.\n",sf->getName().c_str()); @@ -643,7 +644,8 @@ int AmPlugIn::loadDiPlugIn(AmPluginFactory* f) ERROR("component '%s' already loaded !\n",sf->getName().c_str()); goto error; } - + + inc_ref(sf); name2di.insert(std::make_pair(sf->getName(),sf)); DBG("component '%s' loaded.\n",sf->getName().c_str()); @@ -666,7 +668,8 @@ int AmPlugIn::loadLogFacPlugIn(AmPluginFactory* f) sf->getName().c_str()); goto error; } - + + inc_ref(sf); name2logfac.insert(std::make_pair(sf->getName(),sf)); DBG("logging facility component '%s' loaded.\n",sf->getName().c_str());