Cc: Leif Lindholm <leif.lindh...@linaro.org> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <paulo.alc.cavalca...@hp.com> --- v1->v2: Return "Status" variable rather EFI_SUCCESS.
--- .../AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c index 8ec78ae..8178f54 100644 --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c @@ -362,13 +362,13 @@ TcpFastbootTransportStart ( ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "Open TCP Service Binding: %r\n", Status)); - return Status; + goto Exit; } Status = mTcpServiceBinding->CreateChild (mTcpServiceBinding, &mTcpHandle); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "TCP ServiceBinding Create: %r\n", Status)); - return Status; + goto Exit; } Status = gBS->OpenProtocol ( @@ -434,7 +434,7 @@ TcpFastbootTransportStart ( Status = mTcpListener->Configure (mTcpListener, &TcpConfigData); } else if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "TCP Configure: %r\n", Status)); - return Status; + goto Exit; } // @@ -472,14 +472,15 @@ TcpFastbootTransportStart ( Status = mTcpListener->Accept (mTcpListener, &mAcceptToken); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "TCP Accept: %r\n", Status)); - return Status; + goto Exit; } mTextOut->OutputString (mTextOut, L"TCP Fastboot transport initialised.\r\n"); +Exit: FreePool (HandleBuffer); - return EFI_SUCCESS; + return Status; } EFI_STATUS -- 2.6.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel