mirror of
https://github.com/reactos/reactos.git
synced 2024-09-27 21:16:34 +00:00
[NTOS:KD] Handle work-buffer allocation failure in KdpDebugLogInit. It can be ignored in KdpScreenInit.
This commit is contained in:
parent
271b985981
commit
ffe3109d37
|
@ -237,7 +237,14 @@ KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
else if (BootPhase == 1)
|
else if (BootPhase == 1)
|
||||||
{
|
{
|
||||||
/* Allocate a buffer for debug log */
|
/* Allocate a buffer for debug log */
|
||||||
KdpDebugBuffer = ExAllocatePool(NonPagedPool, KdpBufferSize);
|
KdpDebugBuffer = ExAllocatePoolZero(NonPagedPool,
|
||||||
|
KdpBufferSize,
|
||||||
|
TAG_KDBG);
|
||||||
|
if (!KdpDebugBuffer)
|
||||||
|
{
|
||||||
|
KdpDebugMode.File = FALSE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
KdpFreeBytes = KdpBufferSize;
|
KdpFreeBytes = KdpBufferSize;
|
||||||
|
|
||||||
/* Initialize spinlock */
|
/* Initialize spinlock */
|
||||||
|
@ -519,8 +526,10 @@ KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
/* Allocate a buffer for dmesg log buffer. +1 for terminating null,
|
/* Allocate a buffer for dmesg log buffer. +1 for terminating null,
|
||||||
* see kdbp_cli.c:KdbpCmdDmesg()/2
|
* see kdbp_cli.c:KdbpCmdDmesg()/2
|
||||||
*/
|
*/
|
||||||
KdpDmesgBuffer = ExAllocatePool(NonPagedPool, KdpDmesgBufferSize + 1);
|
KdpDmesgBuffer = ExAllocatePoolZero(NonPagedPool,
|
||||||
RtlZeroMemory(KdpDmesgBuffer, KdpDmesgBufferSize + 1);
|
KdpDmesgBufferSize + 1,
|
||||||
|
TAG_KDBG);
|
||||||
|
/* Ignore failure if KdpDmesgBuffer is NULL */
|
||||||
KdpDmesgFreeBytes = KdpDmesgBufferSize;
|
KdpDmesgFreeBytes = KdpDmesgBufferSize;
|
||||||
KdbDmesgTotalWritten = 0;
|
KdbDmesgTotalWritten = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue