- Make sure we successfully allocated memory

svn path=/branches/aicom-network-fixes/; revision=36042
This commit is contained in:
Cameron Gutman 2008-09-07 19:38:21 +00:00
parent f410547dd1
commit 23787cbeb2

View file

@ -861,6 +861,11 @@ static NTSTATUS FindDeviceDescForAdapter( PUNICODE_STRING Name,
ExFreePool( Kbio );
KbioLength = ResultLength;
Kbio = ExAllocatePool( NonPagedPool, KbioLength );
if( !Kbio ) {
TI_DbgPrint(DEBUG_DATALINK,("Failed to allocate memory\n"));
NtClose( EnumKey );
return STATUS_NO_MEMORY;
}
Status = ZwEnumerateKey( EnumKey, i, KeyBasicInformation,
Kbio, KbioLength, &ResultLength );