]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/BlockMmioToBlockIoDxe: Fix allocation size error
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Aug 2012 21:21:44 +0000 (21:21 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Aug 2012 21:21:44 +0000 (21:21 +0000)
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

OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c

index c046ccbbd09355aac1ae96e3617adb8f0741c50f..af9e85ed4e01829b637169a1848e3076a945b85f 100644 (file)
@@ -2,7 +2,7 @@
   The driver wrappers BlockMmio protocol instances to produce\r
   Block I/O Protocol instances.\r
 \r
-  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -287,7 +287,7 @@ BlockIoInit (
   BLOCK_MMIO_TO_BLOCK_IO_DEVICE  *Private;\r
   BLOCK_MMIO_PROTOCOL            *BlockMmio;\r
 \r
-  Private = (BLOCK_MMIO_TO_BLOCK_IO_DEVICE*) AllocateZeroPool (sizeof (Private));\r
+  Private = (BLOCK_MMIO_TO_BLOCK_IO_DEVICE*) AllocateZeroPool (sizeof (*Private));\r
   ASSERT (Private != NULL);\r
 \r
   Status = gBS->LocateProtocol (\r