mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- Don't use uninitialized INetConnection item
- should fix bug 3754 svn path=/trunk/; revision=36704
This commit is contained in:
parent
f8283ec523
commit
a080d60e4c
1 changed files with 4 additions and 4 deletions
|
@ -522,7 +522,7 @@ InitializeNetTaskbarNotifications(
|
||||||
pItem = This->pHead;
|
pItem = This->pHead;
|
||||||
while(pItem)
|
while(pItem)
|
||||||
{
|
{
|
||||||
hr = INetConnection_GetProperties(INetCon, &pProps);
|
hr = INetConnection_GetProperties(pItem->pNet, &pProps);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
ZeroMemory(&nid, sizeof(nid));
|
ZeroMemory(&nid, sizeof(nid));
|
||||||
|
@ -541,7 +541,7 @@ InitializeNetTaskbarNotifications(
|
||||||
}
|
}
|
||||||
pItem = pItem->pNext;
|
pItem = pItem->pNext;
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
/* get an instance to of IConnectionManager */
|
/* get an instance to of IConnectionManager */
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ static const IOleCommandTargetVtbl vt_OleCommandTarget =
|
||||||
HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
|
HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
|
||||||
{
|
{
|
||||||
ILanStatusImpl * This;
|
ILanStatusImpl * This;
|
||||||
static ILanStatusImpl *cached_This = NULL;
|
static volatile ILanStatusImpl *cached_This = NULL;
|
||||||
|
|
||||||
if (!ppv)
|
if (!ppv)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
@ -784,7 +784,7 @@ HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid
|
||||||
This->lpNetMan = NULL;
|
This->lpNetMan = NULL;
|
||||||
This->pHead = NULL;
|
This->pHead = NULL;
|
||||||
|
|
||||||
if (InterlockedCompareExchangePointer((void *)&cached_This, This, NULL) != NULL)
|
if (InterlockedCompareExchangePointer((volatile void **)&cached_This, This, NULL) != NULL)
|
||||||
{
|
{
|
||||||
CoTaskMemFree(This);
|
CoTaskMemFree(This);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue