mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
- Don't access an uninitialized variable
- Initialize the unicode string at the start of the function - Spotted by Amine Khaldi svn path=/trunk/; revision=42642
This commit is contained in:
parent
09286edbce
commit
10b13ed7c9
1 changed files with 2 additions and 2 deletions
|
@ -850,6 +850,8 @@ static NTSTATUS FindDeviceDescForAdapter( PUNICODE_STRING Name,
|
|||
ExAllocatePool(NonPagedPool, sizeof(KEY_BASIC_INFORMATION));
|
||||
ULONG KbioLength = sizeof(KEY_BASIC_INFORMATION), ResultLength;
|
||||
|
||||
RtlInitUnicodeString( DeviceDesc, NULL );
|
||||
|
||||
if( !Kbio ) return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
RtlInitUnicodeString
|
||||
|
@ -904,8 +906,6 @@ static NTSTATUS FindDeviceDescForAdapter( PUNICODE_STRING Name,
|
|||
}
|
||||
}
|
||||
|
||||
RtlInitUnicodeString( DeviceDesc, L"" );
|
||||
AppendUnicodeString( DeviceDesc, &TargetKeyName, FALSE );
|
||||
NtClose( EnumKey );
|
||||
ExFreePool( Kbio );
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
|
|
Loading…
Reference in a new issue