- ExAllocatePoolWithTag is deprecated in Win10 2004, use
ExAllocatePoolUninitialized instead
Signed-off-by: Owen Smith <owen.smith@citrix.com>
__analysis_assume(PoolType == NonPagedPool ||
PoolType == PagedPool);
+#if (_MSC_VER >= 1928) // VS 16.9 (EWDK 20344 or later)
+ Buffer = ExAllocatePoolUninitialized(PoolType, NumberOfBytes, Tag);
+#else
#pragma warning(suppress:28160) // annotation error
Buffer = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
+#endif
if (Buffer == NULL)
return NULL;
IN ULONG Size
)
{
- PVOID Buffer;
- Buffer = ExAllocatePoolWithTag(NonPagedPool,
- Size,
- ADAPTER_POOL_TAG);
- if (Buffer)
- RtlZeroMemory(Buffer, Size);
- return Buffer;
+ return __AllocatePoolWithTag(NonPagedPool,
+ Size,
+ ADAPTER_POOL_TAG);
}
static FORCEINLINE VOID
IN PVOID Buffer
)
{
- ExFreePoolWithTag(Buffer, ADAPTER_POOL_TAG);
+ __FreePoolWithTag(Buffer, ADAPTER_POOL_TAG);
}
static FORCEINLINE PANSI_STRING
IN ULONG Size
)
{
- PVOID Buffer;
-
- Buffer = ExAllocatePoolWithTag(NonPagedPool,
- Size,
- BASE64_POOL_TAG);
- if (Buffer)
- RtlZeroMemory(Buffer, Size);
-
- return Buffer;
+ return __AllocatePoolWithTag(NonPagedPool,
+ Size,
+ BASE64_POOL_TAG);
}
VOID
IN PVOID Buffer
)
{
- if (Buffer)
- ExFreePoolWithTag(Buffer, BASE64_POOL_TAG);
+ __FreePoolWithTag(Buffer, BASE64_POOL_TAG);
}
static FORCEINLINE UCHAR