summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-28 21:21:44 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-28 21:21:44 +0000
commit8d531995e2c0b72350eb46bcd33bbcb03bc27a68 (patch)
treec130e1a20cf3b562b7f3f6bc29b5dd1311a3dc30 /OvmfPkg
parent82045b2f7ac0ec0270fd58fe30f101dd628a59ae (diff)
downloadedk2-8d531995e2c0b72350eb46bcd33bbcb03bc27a68.tar.gz
edk2-8d531995e2c0b72350eb46bcd33bbcb03bc27a68.tar.bz2
edk2-8d531995e2c0b72350eb46bcd33bbcb03bc27a68.zip
OvmfPkg/BlockMmioToBlockIoDxe: Fix allocation size error
When allocating the BLOCK_MMIO_TO_BLOCK_IO_DEVICE structure, we were not allocating a large enough amount. We were allocating the size of the pointer, rather than the size of the structure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13688 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c b/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c
index c046ccbbd0..af9e85ed4e 100644
--- a/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c
+++ b/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c
@@ -2,7 +2,7 @@
The driver wrappers BlockMmio protocol instances to produce
Block I/O Protocol instances.
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -287,7 +287,7 @@ BlockIoInit (
BLOCK_MMIO_TO_BLOCK_IO_DEVICE *Private;
BLOCK_MMIO_PROTOCOL *BlockMmio;
- Private = (BLOCK_MMIO_TO_BLOCK_IO_DEVICE*) AllocateZeroPool (sizeof (Private));
+ Private = (BLOCK_MMIO_TO_BLOCK_IO_DEVICE*) AllocateZeroPool (sizeof (*Private));
ASSERT (Private != NULL);
Status = gBS->LocateProtocol (