Check for failed allocations. Spotted by Martin Bealby.
[reactos.git] / reactos / lib / ntdll / csr / capture.c
index b42124c..fd48ed4 100644 (file)
@@ -95,6 +95,7 @@ CsrAllocateCaptureBuffer(ULONG ArgumentCount,
 
     /* Allocate memory from the port heap */
     CaptureBuffer = RtlAllocateHeap(CsrPortHeap, 0, BufferSize);
+    if (CaptureBuffer == NULL) return NULL;
 
     /* Initialize the header */
     CaptureBuffer->Size = BufferSize;