X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FIp6Dxe%2FComponentName.c;h=6a1f082edd7f6a86d1c6cd30f53dcccb17a59ee9;hb=42a8f2ceb45ec3beaec1262a7c61333c6be7c0b0;hp=dc164269a82ea03deb942e0606d2a98d0a1912b5;hpb=216f79703b8cb8dc65abdd768bedb2bcdbc1a1f8;p=mirror_edk2.git diff --git a/NetworkPkg/Ip6Dxe/ComponentName.c b/NetworkPkg/Ip6Dxe/ComponentName.c index dc164269a8..6a1f082edd 100644 --- a/NetworkPkg/Ip6Dxe/ComponentName.c +++ b/NetworkPkg/Ip6Dxe/ComponentName.c @@ -2,7 +2,7 @@ Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol. - Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -263,6 +263,32 @@ UpdateName ( // Offset = 0; Status = Ip6->GetModeData (Ip6, &Ip6ModeData, NULL, NULL); + if (!EFI_ERROR (Status)) { + if (Ip6ModeData.AddressList != NULL) { + FreePool (Ip6ModeData.AddressList); + } + + if (Ip6ModeData.GroupTable != NULL) { + FreePool (Ip6ModeData.GroupTable); + } + + if (Ip6ModeData.RouteTable != NULL) { + FreePool (Ip6ModeData.RouteTable); + } + + if (Ip6ModeData.NeighborCache != NULL) { + FreePool (Ip6ModeData.NeighborCache); + } + + if (Ip6ModeData.PrefixTable != NULL) { + FreePool (Ip6ModeData.PrefixTable); + } + + if (Ip6ModeData.IcmpTypeList != NULL) { + FreePool (Ip6ModeData.IcmpTypeList); + } + } + if (!EFI_ERROR (Status) && Ip6ModeData.IsStarted) { Status = NetLibIp6ToStr (&Ip6ModeData.ConfigData.StationAddress, Address, sizeof(Address)); if (EFI_ERROR (Status)) { @@ -280,7 +306,7 @@ UpdateName ( } UnicodeSPrint ( HandleName + Offset, - sizeof(HandleName) - Offset, + sizeof(HandleName) - Offset * sizeof (CHAR16), L"DestinationAddress=%s)", Address );