public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol.
@ 2017-12-13  2:15 Fu Siyuan
  2017-12-21  7:22 ` Ye, Ting
  2017-12-21  7:23 ` Wu, Jiaxin
  0 siblings, 2 replies; 3+ messages in thread
From: Fu Siyuan @ 2017-12-13  2:15 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ye Ting, Wu Jiaxin, Wang Fan

This patch fixes a bug in Ip4ConfigProtocol, that new created IP interface is
not freed if Open ARP protocol failed.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Wang Fan <fan.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
---
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
index fc5812e4ab..ac48ad2584 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
@@ -727,6 +727,7 @@ Ip4ConfigProtocol (
                     EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
                     );
     if (EFI_ERROR (Status)) {
+      Ip4FreeInterface (IpIf, IpInstance);
       goto ON_ERROR;
     }
   }
-- 
2.13.0.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol.
  2017-12-13  2:15 [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol Fu Siyuan
@ 2017-12-21  7:22 ` Ye, Ting
  2017-12-21  7:23 ` Wu, Jiaxin
  1 sibling, 0 replies; 3+ messages in thread
From: Ye, Ting @ 2017-12-21  7:22 UTC (permalink / raw)
  To: Fu, Siyuan, edk2-devel@lists.01.org; +Cc: Wang, Fan, Wu, Jiaxin

Reviewed-by: Ye Ting <ting.ye@intel.com> 

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fu, Siyuan
Sent: Wednesday, December 13, 2017 10:16 AM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Wang, Fan <fan.wang@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol.

This patch fixes a bug in Ip4ConfigProtocol, that new created IP interface is not freed if Open ARP protocol failed.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Wang Fan <fan.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
---
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
index fc5812e4ab..ac48ad2584 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
@@ -727,6 +727,7 @@ Ip4ConfigProtocol (
                     EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
                     );
     if (EFI_ERROR (Status)) {
+      Ip4FreeInterface (IpIf, IpInstance);
       goto ON_ERROR;
     }
   }
--
2.13.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol.
  2017-12-13  2:15 [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol Fu Siyuan
  2017-12-21  7:22 ` Ye, Ting
@ 2017-12-21  7:23 ` Wu, Jiaxin
  1 sibling, 0 replies; 3+ messages in thread
From: Wu, Jiaxin @ 2017-12-21  7:23 UTC (permalink / raw)
  To: Fu, Siyuan, edk2-devel@lists.01.org; +Cc: Ye, Ting, Wang, Fan

Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>



> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fu,
> Siyuan
> Sent: Wednesday, December 13, 2017 10:16 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Wang, Fan <fan.wang@intel.com>; Wu,
> Jiaxin <jiaxin.wu@intel.com>
> Subject: [edk2] [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if
> failed to open ARP protocol.
> 
> This patch fixes a bug in Ip4ConfigProtocol, that new created IP interface is
> not freed if Open ARP protocol failed.
> 
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> Cc: Wang Fan <fan.wang@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
> ---
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> index fc5812e4ab..ac48ad2584 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
> @@ -727,6 +727,7 @@ Ip4ConfigProtocol (
>                      EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
>                      );
>      if (EFI_ERROR (Status)) {
> +      Ip4FreeInterface (IpIf, IpInstance);
>        goto ON_ERROR;
>      }
>    }
> --
> 2.13.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-21  7:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13  2:15 [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol Fu Siyuan
2017-12-21  7:22 ` Ye, Ting
2017-12-21  7:23 ` Wu, Jiaxin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox