]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/close.c
OvmfPkg/PlatformBootManagerLib: hoist PciAcpiInitialization()
[mirror_edk2.git] / StdLib / BsdSocketLib / close.c
index 3dfeb2bf1895b05e86124f1dd34e216433b2def1..01eb48ecb58991a0f298eeaff86184532489ff27 100644 (file)
@@ -31,7 +31,6 @@ BslSocketCloseWork (
   IN int * pErrno\r
   )\r
 {\r
-  EFI_SERVICE_BINDING_PROTOCOL * pServiceBinding;\r
   EFI_STATUS Status;\r
 \r
   //\r
@@ -50,21 +49,9 @@ BslSocketCloseWork (
   }\r
   if ( !EFI_ERROR ( Status )) {\r
     //\r
-    //  Locate the socket protocol\r
+    //  Release the socket resources\r
     //\r
-    Status = gBS->LocateProtocol ( &gEfiSocketServiceBindingProtocolGuid,\r
-                                   NULL,\r
-                                   (VOID **) &pServiceBinding );\r
-    if ( !EFI_ERROR ( Status )) {\r
-      //\r
-      //  Release the handle\r
-      //\r
-      Status = pServiceBinding->DestroyChild ( pServiceBinding,\r
-                                               pSocketProtocol->SocketHandle );\r
-    }\r
-    if ( EFI_ERROR ( Status )) {\r
-      *pErrno = EIO;\r
-    }\r
+    *pErrno = EslServiceFreeProtocol ( pSocketProtocol );\r
   }\r
   else {\r
     DEBUG (( DEBUG_ERROR,\r
@@ -94,6 +81,7 @@ BslSocketCloseWork (
 \r
 **/\r
 int\r
+EFIAPI\r
 BslSocketClose (\r
   struct __filedes * pDescriptor\r
   )\r