mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
urlmon: Fix a reference count leak that would keep the module alive when it shouldn't.
This commit is contained in:
parent
bc4bbb40d1
commit
fd8868bac4
@ -220,11 +220,19 @@ static void init_session(BOOL init)
|
||||
for(i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) {
|
||||
if(object_creation[i].protocol) {
|
||||
if(init)
|
||||
{
|
||||
IInternetSession_RegisterNameSpace(session, object_creation[i].cf,
|
||||
object_creation[i].clsid, object_creation[i].protocol, 0, NULL, 0);
|
||||
/* make sure that the AddRef on the class factory doesn't keep us loaded */
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* make sure that the Release on the class factory doesn't unload us */
|
||||
URLMON_LockModule();
|
||||
IInternetSession_UnregisterNameSpace(session, object_creation[i].cf,
|
||||
object_creation[i].protocol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user