From e9802940f00aba180f48f15b5d7ea6877dc3bc44 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Wojdy=C5=82a?= Date: Tue, 12 Dec 2023 10:38:45 +0100 Subject: [PATCH] __CaptureUserBuffer(): zero CapturedBuffer on failure in all cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Wojdyła --- src/xeniface/ioctls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xeniface/ioctls.c b/src/xeniface/ioctls.c index 6298fef..479f0f6 100644 --- a/src/xeniface/ioctls.c +++ b/src/xeniface/ioctls.c @@ -56,8 +56,10 @@ __CaptureUserBuffer( Status = STATUS_NO_MEMORY; TempBuffer = __AllocatePoolWithTag(NonPagedPool, Length, XENIFACE_POOL_TAG); - if (TempBuffer == NULL) + if (TempBuffer == NULL) { + *CapturedBuffer = NULL; return STATUS_INSUFFICIENT_RESOURCES; + } Status = STATUS_SUCCESS; -- 2.39.5