summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--video/KMDOD/bdd_ddi.cxx3
-rw-r--r--video/KMDOD/blthw.cxx3
2 files changed, 3 insertions, 3 deletions
diff --git a/video/KMDOD/bdd_ddi.cxx b/video/KMDOD/bdd_ddi.cxx
index 924758c5..cdbe8594 100644
--- a/video/KMDOD/bdd_ddi.cxx
+++ b/video/KMDOD/bdd_ddi.cxx
@@ -103,7 +103,8 @@ BddDdiAddDevice(
}
*ppDeviceContext = NULL;
- BASIC_DISPLAY_DRIVER* pBDD = new(POOL_FLAG_NON_PAGED) BASIC_DISPLAY_DRIVER(pPhysicalDeviceObject);
+ void* pBDDMemory = operator new(sizeof(BASIC_DISPLAY_DRIVER), POOL_FLAG_NON_PAGED);
+ BASIC_DISPLAY_DRIVER* pBDD = pBDDMemory ? new(pBDDMemory) BASIC_DISPLAY_DRIVER(pPhysicalDeviceObject) : NULL;
if (pBDD == NULL)
{
BDD_LOG_LOW_RESOURCE0("pBDD failed to be allocated");
diff --git a/video/KMDOD/blthw.cxx b/video/KMDOD/blthw.cxx
index b2f82492..0b1ff0b1 100644
--- a/video/KMDOD/blthw.cxx
+++ b/video/KMDOD/blthw.cxx
@@ -281,8 +281,7 @@ BDD_HWBLT::ExecutePresentDisplayOnly(
SIZE_T sizeRects = NumDirtyRects*sizeof(RECT);
SIZE_T size = sizeof(DoPresentMemory) + sizeMoves + sizeRects;
- DoPresentMemory* ctx = reinterpret_cast<DoPresentMemory*>
- (new (POOL_FLAG_PAGED) BYTE[size]);
+ DoPresentMemory* ctx = reinterpret_cast<DoPresentMemory*>(operator new[](size, POOL_FLAG_PAGED));
if (!ctx)
{