MT#63171 AmPlugIn: fix reference counting

Increase refcount also for DI plugins and log plugins, as they also have
their refcount decreased for unloading.

Change-Id: I0b9d2f671a2a1acda4e5210855aafd47f8cb62c3
mr13.5
Richard Fuchs 1 year ago
parent 35e15382ac
commit e30510bbca

@ -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());

Loading…
Cancel
Save