Commit 3b93ff71 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

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

parent 43d07203
...@@ -637,7 +637,10 @@ DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage, ...@@ -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, ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment