ScanLineAhead = (PIXEL *)ExAllocatePool(PagedPool, (DestRect->right -
DestRect->left) * sizeof(PIXEL));
+
+ if (!ScanLine || !ScanLineAhead)
+ {
+ if (ScanLine) ExFreePool(ScanLine);
+ if (ScanLineAhead) ExFreePool(ScanLineAhead);
+ return FALSE;
+ }
DestY = DestRect->top;
SpanIndex = 0;
ScanLine = (PIXEL*)ExAllocatePool(PagedPool, (DestRect->right - DestRect->left) * sizeof(PIXEL));
ScanLineAhead = (PIXEL *)ExAllocatePool(PagedPool, (DestRect->right - DestRect->left) * sizeof(PIXEL));
+ if (!ScanLine || !ScanLineAhead)
+ {
+ if (ScanLine) ExFreePool(ScanLine);
+ if (ScanLineAhead) ExFreePool(ScanLineAhead);
+ return FALSE;
+ }
+
DestY = DestRect->top;
SpanIndex = 0;
while (NumPixels-- > 0) {
ScanLine = (PIXEL*)ExAllocatePool(PagedPool, (DestRect->right - DestRect->left) * sizeof(PIXEL));
ScanLineAhead = (PIXEL *)ExAllocatePool(PagedPool, (DestRect->right - DestRect->left) * sizeof(PIXEL));
+ if (!ScanLine || !ScanLineAhead)
+ {
+ if (ScanLine) ExFreePool(ScanLine);
+ if (ScanLineAhead) ExFreePool(ScanLineAhead);
+ return FALSE;
+ }
+
DestY = DestRect->top;
SpanIndex = 0;
while (NumPixels-- > 0) {
if (PrimarySurface.pEDDgpl)
{
RtlZeroMemory( PrimarySurface.pEDDgpl ,sizeof(EDD_DIRECTDRAW_GLOBAL));
+ ret = TRUE;
}
- ret = TRUE;
goto cleanup;
}
{ // This is a cheesy way to do this.
PDC dc = DC_LockDc ( hDC );
defaultDCstate = ExAllocatePoolWithTag(PagedPool, sizeof(DC), TAG_DC);
+ if (!defaultDCstate)
+ {
+ DC_UnlockDc( dc );
+ return NULL;
+ }
RtlZeroMemory(defaultDCstate, sizeof(DC));
IntGdiCopyToSaveState(dc, defaultDCstate);
DC_UnlockDc( dc );