mpr: Initialize handle to NULL on ERROR_NO_NETWORK case in WNetOpenEnum.

This commit is contained in:
Aric Stewart 2009-12-07 12:59:52 -06:00 committed by Alexandre Julliard
parent 43d0720335
commit 3b93ff71c7
1 changed files with 6 additions and 0 deletions

View File

@ -637,7 +637,10 @@ DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
if (!lphEnum)
ret = WN_BAD_POINTER;
else if (!providerTable || providerTable->numProviders == 0)
{
lphEnum = NULL;
ret = WN_NO_NETWORK;
}
else
{
if (lpNet)
@ -726,7 +729,10 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
if (!lphEnum)
ret = WN_BAD_POINTER;
else if (!providerTable || providerTable->numProviders == 0)
{
lphEnum = NULL;
ret = WN_NO_NETWORK;
}
else
{
switch (dwScope)