mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
combase: Compare AddRef() return value against 1 instead of 0 in find_proxy_manager.
Today, find_proxy_manager() tests if AddRef() returns 0 in an attempt to protect against a race condition bug. Note that AddRef does not return zero in normal circumstances, since AddRef returns the reference count after the increment, not before. Fix this by comparing the return value of AddRef() against 1, not 0.
This commit is contained in:
parent
b97090214b
commit
f55f0b8342
1 changed files with 1 additions and 1 deletions
|
@ -1949,7 +1949,7 @@ static BOOL find_proxy_manager(struct apartment * apt, OXID oxid, OID oid, struc
|
|||
/* be careful of a race with ClientIdentity_Release, which would
|
||||
* cause us to return a proxy which is in the process of being
|
||||
* destroyed */
|
||||
if (IMultiQI_AddRef(&proxy->IMultiQI_iface) != 0)
|
||||
if (IMultiQI_AddRef(&proxy->IMultiQI_iface) != 1)
|
||||
{
|
||||
*proxy_found = proxy;
|
||||
found = TRUE;
|
||||
|
|
Loading…
Reference in a new issue