gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 163/222: socketpair: fix double-close in error case


From: gnunet
Subject: [gnurl] 163/222: socketpair: fix double-close in error case
Date: Thu, 07 Nov 2019 00:10:59 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 622cf7db6bd2d943e67660020b3984e6068f1084
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Oct 10 11:18:21 2019 +0200

    socketpair: fix double-close in error case
    
    Follow-up to bc2dbef0afc08
---
 lib/socketpair.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/socketpair.c b/lib/socketpair.c
index 5dd9f27e9..ffdfdad7f 100644
--- a/lib/socketpair.c
+++ b/lib/socketpair.c
@@ -89,8 +89,6 @@ int Curl_socketpair(int domain, int type, int protocol,
   if(socks[1] == CURL_SOCKET_BAD)
     goto error;
 
-  sclose(listener);
-
   /* verify that nothing else connected */
   msnprintf(data[0], sizeof(data[0]), "%p", socks);
   dlen = strlen(data[0]);
@@ -100,6 +98,8 @@ int Curl_socketpair(int domain, int type, int protocol,
     goto error;
   if(memcmp(data[0], data[1], dlen))
     goto error;
+
+  sclose(listener);
   return 0;
 
   error:

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]