summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2017-06-02 13:17:17 +0800
committerFu Siyuan <siyuan.fu@intel.com>2017-06-02 13:19:23 +0800
commit8f0dea41bc7e550709f6e43843d8004c5060030b (patch)
treef21b4ca800e508ad5587aa7adec0892c00b52cb7 /MdeModulePkg
parent0e3899bed8d4c82ab491d23157c52c0e7734c625 (diff)
downloadedk2-8f0dea41bc7e550709f6e43843d8004c5060030b.tar.gz
edk2-8f0dea41bc7e550709f6e43843d8004c5060030b.tar.bz2
edk2-8f0dea41bc7e550709f6e43843d8004c5060030b.zip
MdeModulePkg/MnpDxe: Fix EBC build hang issue.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> (cherry picked from commit 54d7177c78dc35919a631c8baa533d287bf0ae57)
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
index d1a4cb5dd2..e24cb758cd 100644
--- a/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
+++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
@@ -1,7 +1,7 @@
/** @file
Implementation of Managed Network Protocol private services.
-Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2017, 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
@@ -235,7 +235,7 @@ MnpAddFreeTxBuf (
Status = EFI_SUCCESS;
for (Index = 0; Index < Count; Index++) {
- TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (sizeof (MNP_TX_BUF_WRAP) + MnpDeviceData->BufferLength - 1);
+ TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (OFFSET_OF (MNP_TX_BUF_WRAP, TxBuf) + MnpDeviceData->BufferLength );
if (TxBufWrap == NULL) {
DEBUG ((EFI_D_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));