X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FIp6Dxe%2FComponentName.c;h=e314f152070352c73e1dc208850042504ef1a2b8;hb=160b082e64a8336ac23eb4c28216a6097e6ba648;hp=75a1562ca07f31e2e3d1b78bf3c2f31763effde4;hpb=f8c075d112ebb41f2dfc693426c33a9ed2e9bb22;p=mirror_edk2.git diff --git a/NetworkPkg/Ip6Dxe/ComponentName.c b/NetworkPkg/Ip6Dxe/ComponentName.c index 75a1562ca0..e314f15207 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 - 2018, 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 @@ -238,10 +238,10 @@ Ip6ComponentNameGetDriverName ( @param Ip6[in] A pointer to the EFI_IP6_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -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)) { @@ -294,7 +320,7 @@ UpdateName ( FreeUnicodeStringTable (gIp6ControllerNameTable); gIp6ControllerNameTable = NULL; } - + Status = AddUnicodeString2 ( "eng", gIp6ComponentName.SupportedLanguages, @@ -305,7 +331,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gIp6ComponentName2.SupportedLanguages, @@ -395,7 +421,7 @@ Ip6ComponentNameGetControllerName ( { EFI_STATUS Status; EFI_IP6_PROTOCOL *Ip6; - + // // Only provide names for child handles. // @@ -404,7 +430,7 @@ Ip6ComponentNameGetControllerName ( } // - // Make sure this driver produced ChildHandle + // Make sure this driver produced ChildHandle // Status = EfiTestChildHandle ( ControllerHandle,