]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
memdebug: log socket close before closing
authorStefan Eissing <stefan@eissing.org>
Mon, 1 Dec 2025 17:08:25 +0000 (18:08 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 1 Dec 2025 23:58:31 +0000 (00:58 +0100)
To not get a mixup in the memdebug log order.

Closes #19793

lib/memdebug.c

index bbd7407c3c90578a1582304798c73685c6d6cd83..7eae1708b7de295ec9849004b8865fe637af1541 100644 (file)
@@ -468,9 +468,8 @@ void curl_dbg_mark_sclose(curl_socket_t sockfd, int line, const char *source)
 /* this is our own defined way to close sockets on *ALL* platforms */
 int curl_dbg_sclose(curl_socket_t sockfd, int line, const char *source)
 {
-  int res = CURL_SCLOSE(sockfd);
   curl_dbg_mark_sclose(sockfd, line, source);
-  return res;
+  return CURL_SCLOSE(sockfd);
 }
 
 ALLOC_FUNC