- Don't use uninitialized INetConnection item

- should fix bug 3754

svn path=/trunk/; revision=36704
This commit is contained in:
Johannes Anderwald 2008-10-10 09:36:39 +00:00
parent f8283ec523
commit a080d60e4c

View file

@ -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);
} }