8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 10:03:03 +01:00

Fixed 2 segfaults when using UDRs

This commit is contained in:
alexpeshkoff 2014-10-01 12:47:04 +00:00
parent 22948f2a94
commit 5ac759124e
2 changed files with 6 additions and 9 deletions

View File

@ -185,8 +185,6 @@ public:
//--------------------------------------
static AutoPtr<ModuleLoader::Module> libraryModule;
static GlobalPtr<Mutex> modulesMutex;
static GlobalPtr<ModulesMap> modules;
@ -733,11 +731,6 @@ extern "C" void FB_EXPORTED FB_PLUGIN_ENTRY_POINT(IMaster* master)
PluginManagerInterfacePtr pi;
pi->registerPluginFactory(IPluginManager::ExternalEngine, "UDR", &factory);
getUnloadDetector()->registerMe();
PathName libraryName("fbclient");
ModuleLoader::doctorModuleExtension(libraryName);
libraryModule.reset(ModuleLoader::loadModule(libraryName));
}

View File

@ -3695,13 +3695,17 @@ namespace Why {
IAttachment* MasterImplementation::registerAttachment(IProvider* provider, IAttachment* attachment)
{
return new YAttachment(provider, attachment, "");
IAttachment* rc = new YAttachment(provider, attachment, "");
attachment->addRef();
return rc;
}
ITransaction* MasterImplementation::registerTransaction(IAttachment* attachment,
ITransaction* transaction)
{
return new YTransaction(static_cast<YAttachment*>(attachment), transaction);
ITransaction* rc = new YTransaction(static_cast<YAttachment*>(attachment), transaction);
transaction->addRef();
return rc;
}
template <typename Impl, typename Intf>