From 93abe83cd2a4996c6cbd334c6209043a32095b84 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 3 Aug 2008 05:10:53 +0000 Subject: [PATCH] - Check to see if the ZwEnumerateKey call succeeded with the larger buffer and continue if possible svn path=/branches/aicom-network-fixes/; revision=35055 --- drivers/network/tcpip/datalink/lan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/network/tcpip/datalink/lan.c b/drivers/network/tcpip/datalink/lan.c index 94239036f99..e88bb9d85ab 100644 --- a/drivers/network/tcpip/datalink/lan.c +++ b/drivers/network/tcpip/datalink/lan.c @@ -860,8 +860,10 @@ static NTSTATUS FindDeviceDescForAdapter( PUNICODE_STRING Name, Status = ZwEnumerateKey( EnumKey, i, KeyBasicInformation, Kbio, KbioLength, &ResultLength ); - TI_DbgPrint(DEBUG_DATALINK,("Couldn't enum key child %d\n", i)); - return Status; + if( !NT_SUCCESS(Status) ) { + TI_DbgPrint(DEBUG_DATALINK,("Couldn't enum key child %d\n", i)); + return Status; + } } if( NT_SUCCESS(Status) ) {