[PATCH 1/4] urlmon: If we are using an internal protocol ClassFactory, call its AddRef as the caller must Release the object.

Misha Koshelev mk144210 at bcm.edu
Tue Jul 24 00:14:58 CDT 2007


This is a janitorial patchset. It makes the URLMON_refCount end up at 0 at least after all our tests (whereas
before it was in the negatives, and this count is compared to zero in DllUnloadNow to see if the Dll can be
unloaded).

This patch:
* get_protocol_handler either returns one of our protocol IClassFactory's which it already has stored in
an array (or linked list is it?) or else calls get_protocol_cf which uses CoGetClassObject to return
a pluggable handler's IClassFactory. In the case of CoGetClassObject, the IClassFactory must properly be
Released after it's CreateInstance method has been called for the protocol, but in the case of our own
ClassFactory this would result in an extra call to IClassFactory_Release without the corresponding AddRef
call, thus an extra URLMON_UnlockModule and a negative URLMON_refCount.
---
 dlls/urlmon/session.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d4e7288a1fb3473e6eeb585f33a411a6e357927f.diff
Type: text/x-patch
Size: 438 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070724/c057c25e/d4e7288a1fb3473e6eeb585f33a411a6e357927f.bin


More information about the wine-patches mailing list