- Make sure we set a failure status when we fail so we don't complete with NDIS_STATUS_SUCCESS when we really failed

svn path=/branches/aicom-network-fixes/; revision=36071
This commit is contained in:
Cameron Gutman 2008-09-08 23:42:14 +00:00
parent 8ea40ee79e
commit 128aeae543

View file

@ -301,7 +301,10 @@ NdisOpenFile(
memmove ( FullFileName.Buffer, NDIS_FILE_FOLDER, FullFileName.Length );
*Status = RtlAppendUnicodeStringToString ( &FullFileName, FileName );
if ( !NT_SUCCESS(*Status) )
{
*Status = NDIS_STATUS_FAILURE;
goto cleanup;
}
InitializeObjectAttributes ( &ObjectAttributes,
&FullFileName,
@ -321,6 +324,11 @@ NdisOpenFile(
FILE_SYNCHRONOUS_IO_NONALERT, // ULONG CreateOptions
0, // PVOID EaBuffer
0 ); // ULONG EaLength
if ( !NT_SUCCESS(*Status) )
{
*Status = NDIS_STATUS_FAILURE;
}
cleanup:
if ( FullFileName.Buffer != NULL )