From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mx.groups.io with SMTP id smtpd.web08.31344.1606113421774350480 for ; Sun, 22 Nov 2020 22:37:04 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.191, mailfrom: xiewenyi2@huawei.com) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cfcr61sMczhfcj; Mon, 23 Nov 2020 14:36:38 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 23 Nov 2020 14:36:49 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v1 1/1] OvmfPkg/XenPvBlkDxe: add assert for pool allocating Date: Mon, 23 Nov 2020 14:35:20 +0800 Message-ID: <1606113320-7758-2-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1606113320-7758-1-git-send-email-xiewenyi2@huawei.com> References: <1606113320-7758-1-git-send-email-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain add assert after pool allocating. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Signed-off-by: Wenyi Xie --- OvmfPkg/XenPvBlkDxe/BlockFront.c | 1 + 1 file changed, 1 insertion(+) diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.c b/OvmfPkg/XenPvBlkDxe/BlockFront.c index 122a6baed25a..bde385090832 100644 --- a/OvmfPkg/XenPvBlkDxe/BlockFront.c +++ b/OvmfPkg/XenPvBlkDxe/BlockFront.c @@ -155,6 +155,7 @@ XenPvBlockFrontInitialization ( ASSERT (NodeName != NULL); Dev = AllocateZeroPool (sizeof (XEN_BLOCK_FRONT_DEVICE)); + ASSERT (Dev != NULL); Dev->Signature = XEN_BLOCK_FRONT_SIGNATURE; Dev->NodeName = NodeName; Dev->XenBusIo = XenBusIo; -- 2.20.1.windows.1