[ros-diffs] [cgutman] 36042: - Make sure we successfully allocated memory

cgutman at svn.reactos.org cgutman at svn.reactos.org
Sun Sep 7 21:38:22 CEST 2008


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/network/tcpip/datalink/lan.c?rev=36042&r1=36041&r2=36042&view=diff
==============================================================================
--- 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 );



More information about the Ros-diffs mailing list