Commit fd8868ba authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

urlmon: Fix a reference count leak that would keep the module alive when it shouldn't.

parent bc4bbb40
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment