summaryrefslogtreecommitdiff
path: root/NetworkPkg/TcpDxe
diff options
context:
space:
mode:
authorWu Jiaxin <jiaxin.wu@intel.com>2015-02-04 06:42:43 +0000
committerjiaxinwu <jiaxinwu@Edk2>2015-02-04 06:42:43 +0000
commitec3058392f9b84f7f8a96e15f38fb686463e714a (patch)
treeaa113a62ffbfdacdef303a065223ce3ae8657cfb /NetworkPkg/TcpDxe
parentc615a4bc7310c5a01ef2b178452e45203d293ff7 (diff)
downloadedk2-ec3058392f9b84f7f8a96e15f38fb686463e714a.zip
edk2-ec3058392f9b84f7f8a96e15f38fb686463e714a.tar.gz
edk2-ec3058392f9b84f7f8a96e15f38fb686463e714a.tar.bz2
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@16742 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/TcpDxe')
-rw-r--r--NetworkPkg/TcpDxe/ComponentName.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/NetworkPkg/TcpDxe/ComponentName.c b/NetworkPkg/TcpDxe/ComponentName.c
index ecfda7a..41eb5a5 100644
--- a/NetworkPkg/TcpDxe/ComponentName.c
+++ b/NetworkPkg/TcpDxe/ComponentName.c
@@ -2,7 +2,7 @@
Implementation of protocols EFI_COMPONENT_NAME_PROTOCOL and
EFI_COMPONENT_NAME2_PROTOCOL.
- Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -253,6 +253,7 @@ UpdateTcp4Name (
// 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),
@@ -261,7 +262,7 @@ UpdateTcp4Name (
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),
@@ -322,6 +323,7 @@ UpdateTcp6Name (
//
// Format the child name into the string buffer.
//
+ ZeroMem (&Tcp6ConfigData, sizeof (Tcp6ConfigData));
Status = Tcp6->GetModeData (Tcp6, NULL, &Tcp6ConfigData, NULL, NULL, NULL);
if (!EFI_ERROR (Status)) {
UnicodeSPrint (HandleName, sizeof (HandleName),