Module: wine Branch: master Commit: fd8868bac453bf4f25aa40ceca66ce1e3d36f509 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd8868bac453bf4f25aa40ceca...
Author: Rob Shearman rob@codeweavers.com Date: Sun Apr 1 13:43:39 2007 +0100
urlmon: Fix a reference count leak that would keep the module alive when it shouldn't.
---
dlls/urlmon/urlmon_main.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index 3d29feb..0f12011 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -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); + } } }