- Merge aicom-network-fixes up to r35946

svn path=/trunk/; revision=35955
This commit is contained in:
Cameron Gutman 2008-09-05 00:43:28 +00:00
parent 0542c270aa
commit a78ab11616
4 changed files with 12 additions and 7 deletions

View file

@ -521,9 +521,11 @@ NdisReadConfiguration(
ExFreePool(KeyInformation);
if(*Status != STATUS_SUCCESS)
if(*Status != STATUS_SUCCESS) {
ExFreePool(*ParameterValue);
*ParameterValue = NULL;
*Status = NDIS_STATUS_FAILURE;
else
} else
*Status = NDIS_STATUS_SUCCESS;
return;
@ -567,6 +569,7 @@ NdisReadConfiguration(
if(!MiniportResource)
{
NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n"));
ExFreePool(RegData);
ExFreePool(KeyInformation);
ExFreePool(*ParameterValue);
*ParameterValue = NULL;

View file

@ -1623,7 +1623,7 @@ NdisIAddDevice(
Status = IoGetDeviceProperty(PhysicalDeviceObject, DevicePropertyDriverKeyName,
0, NULL, &DriverKeyLength);
if (Status != STATUS_BUFFER_TOO_SMALL && Status != STATUS_BUFFER_OVERFLOW)
if (Status != STATUS_BUFFER_TOO_SMALL && Status != STATUS_BUFFER_OVERFLOW && Status != STATUS_SUCCESS)
{
NDIS_DbgPrint(DEBUG_MINIPORT, ("Can't get miniport driver key length.\n"));
return Status;

View file

@ -783,7 +783,7 @@ NdisRegisterProtocol(
RtlInitUnicodeString(&ValueName, L"Bind");
NtStatus = ZwQueryValueKey(DriverKeyHandle, &ValueName, KeyValuePartialInformation, NULL, 0, &ResultLength);
if(NtStatus != STATUS_BUFFER_OVERFLOW && NtStatus != STATUS_BUFFER_TOO_SMALL)
if(NtStatus != STATUS_BUFFER_OVERFLOW && NtStatus != STATUS_BUFFER_TOO_SMALL && NtStatus != STATUS_SUCCESS)
{
NDIS_DbgPrint(MID_TRACE, ("Unable to query the Bind value for size\n"));
ZwClose(DriverKeyHandle);

View file

@ -331,10 +331,12 @@ cleanup:
ExFreePool ( FullFileName.Buffer );
FullFileName.Buffer = NULL;
}
if ( !NT_SUCCESS(*Status) && FileHandleObject != NULL )
if ( !NT_SUCCESS(*Status) )
{
ExFreePool ( FileHandleObject );
FileHandleObject = NULL;
if( FileHandleObject ) {
ExFreePool ( FileHandleObject );
FileHandleObject = NULL;
}
*FileHandle = NULL;
}
else