summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Tcp4Dxe
diff options
context:
space:
mode:
authorWu Jiaxin <jiaxin.wu@intel.com>2015-02-04 06:43:34 +0000
committerjiaxinwu <jiaxinwu@Edk2>2015-02-04 06:43:34 +0000
commit35a26499af72f2b0131c5d09141f3da00faf6005 (patch)
treeb77859ec49de8576d7c1175e7374167d3dd78cc7 /MdeModulePkg/Universal/Network/Tcp4Dxe
parentec3058392f9b84f7f8a96e15f38fb686463e714a (diff)
downloadedk2-platforms-35a26499af72f2b0131c5d09141f3da00faf6005.tar.xz
Initialize data and correct faulty logic in TcpComponentNameGetControllerName().
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16743 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c
index c9043958b4..bb3a39c5b1 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for Tcp4Dxe driver.
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2015, 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
@@ -256,6 +256,7 @@ UpdateName (
// Format the child name into the string buffer as:
// TCPv4 (SrcPort=59, DestPort=60, ActiveFlag=TRUE)
//
+ ZeroMem (&Tcp4ConfigData, sizeof (Tcp4ConfigData));
Status = Tcp4->GetModeData (Tcp4, NULL, &Tcp4ConfigData, NULL, NULL, NULL);
if (!EFI_ERROR (Status)) {
UnicodeSPrint (HandleName, sizeof (HandleName),
@@ -264,7 +265,7 @@ UpdateName (
Tcp4ConfigData.AccessPoint.RemotePort,
(Tcp4ConfigData.AccessPoint.ActiveFlag ? L"TRUE" : L"FALSE")
);
- } if (Status == EFI_NOT_STARTED) {
+ } else if (Status == EFI_NOT_STARTED) {
UnicodeSPrint (
HandleName,
sizeof (HandleName),