mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- fixed uninitialized variable warning
- ProbeAndCaptureUnicodeString should check if allocating memory succeeded svn path=/trunk/; revision=18061
This commit is contained in:
parent
18494d1af0
commit
2148ae3457
2 changed files with 10 additions and 5 deletions
|
@ -130,11 +130,16 @@ ProbeAndCaptureUnicodeString(OUT PUNICODE_STRING Dest,
|
||||||
/* Allocate space for the buffer */
|
/* Allocate space for the buffer */
|
||||||
Buffer = ExAllocatePool(PagedPool, Dest->MaximumLength);
|
Buffer = ExAllocatePool(PagedPool, Dest->MaximumLength);
|
||||||
|
|
||||||
|
if (Buffer != NULL)
|
||||||
|
{
|
||||||
/* Copy it */
|
/* Copy it */
|
||||||
RtlCopyMemory(Buffer, Dest->Buffer, Dest->MaximumLength);
|
RtlCopyMemory(Buffer, Dest->Buffer, Dest->MaximumLength);
|
||||||
|
|
||||||
/* Set it as the buffer */
|
/* Set it as the buffer */
|
||||||
Dest->Buffer = Buffer;
|
Dest->Buffer = Buffer;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/* Return */
|
/* Return */
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -1852,7 +1852,7 @@ NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
|
||||||
RTL_QUERY_REGISTRY_TABLE QueryTable[3];
|
RTL_QUERY_REGISTRY_TABLE QueryTable[3];
|
||||||
UNICODE_STRING ImagePath;
|
UNICODE_STRING ImagePath;
|
||||||
UNICODE_STRING ServiceName;
|
UNICODE_STRING ServiceName;
|
||||||
UNICODE_STRING CapturedDriverServiceName;
|
UNICODE_STRING CapturedDriverServiceName = {0};
|
||||||
KPROCESSOR_MODE PreviousMode;
|
KPROCESSOR_MODE PreviousMode;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG Type;
|
ULONG Type;
|
||||||
|
|
Loading…
Reference in a new issue