Author: cgutman Date: Sun Sep 7 14:38:21 2008 New Revision: 36042
URL: http://svn.reactos.org/svn/reactos?rev=36042&view=rev Log: - Make sure we successfully allocated memory
Modified: branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c
Modified: branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/netw... ============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Sun Sep 7 14:38:21 2008 @@ -861,6 +861,11 @@ 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 );