mpr: Initialize handle to NULL on ERROR_NO_NETWORK case in WNetOpenEnum.
This commit is contained in:
parent
43d0720335
commit
3b93ff71c7
|
@ -637,7 +637,10 @@ DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
||||||
if (!lphEnum)
|
if (!lphEnum)
|
||||||
ret = WN_BAD_POINTER;
|
ret = WN_BAD_POINTER;
|
||||||
else if (!providerTable || providerTable->numProviders == 0)
|
else if (!providerTable || providerTable->numProviders == 0)
|
||||||
|
{
|
||||||
|
lphEnum = NULL;
|
||||||
ret = WN_NO_NETWORK;
|
ret = WN_NO_NETWORK;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (lpNet)
|
if (lpNet)
|
||||||
|
@ -726,7 +729,10 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
||||||
if (!lphEnum)
|
if (!lphEnum)
|
||||||
ret = WN_BAD_POINTER;
|
ret = WN_BAD_POINTER;
|
||||||
else if (!providerTable || providerTable->numProviders == 0)
|
else if (!providerTable || providerTable->numProviders == 0)
|
||||||
|
{
|
||||||
|
lphEnum = NULL;
|
||||||
ret = WN_NO_NETWORK;
|
ret = WN_NO_NETWORK;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (dwScope)
|
switch (dwScope)
|
||||||
|
|
Loading…
Reference in New Issue