From b497a8a89407a4c3566b7e833bbdabc2f61eefd0 Mon Sep 17 00:00:00 2001 From: lpleahy Date: Fri, 22 Jun 2012 21:46:55 +0000 Subject: [PATCH] Fix listen exit path when last port returns an error. Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13466 6f19259b-4bc3-4df7-8a09-765794883524 --- StdLib/EfiSocketLib/Tcp4.c | 2 ++ StdLib/EfiSocketLib/Tcp6.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/StdLib/EfiSocketLib/Tcp4.c b/StdLib/EfiSocketLib/Tcp4.c index e7924fa429..145186bb36 100644 --- a/StdLib/EfiSocketLib/Tcp4.c +++ b/StdLib/EfiSocketLib/Tcp4.c @@ -790,6 +790,8 @@ EslTcp4Listen ( // Mark the socket as configured // pSocket->bConfigured = TRUE; + Status = EFI_SUCCESS; + pSocket->errno = 0; // // All done diff --git a/StdLib/EfiSocketLib/Tcp6.c b/StdLib/EfiSocketLib/Tcp6.c index 688a256f64..df70a94f4c 100644 --- a/StdLib/EfiSocketLib/Tcp6.c +++ b/StdLib/EfiSocketLib/Tcp6.c @@ -821,6 +821,8 @@ EslTcp6Listen ( // Mark the socket as configured // pSocket->bConfigured = TRUE; + Status = EFI_SUCCESS; + pSocket->errno = 0; // // All done