Skip to content

Commit 86c96b4

Browse files
committed
Fix WSA protocol info cleanup in request shutdown
- Add zend_hash_clean() in PHP_RSHUTDOWN_FUNCTION to cleanup wsa_info - Ensures all WSA HANDLE resources are properly closed at end of request - Prevents resource leak when socket_wsaprotocol_info_release() is not called
1 parent 3f6a5c8 commit 86c96b4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ext/sockets/sockets.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ static PHP_RSHUTDOWN_FUNCTION(sockets)
546546
SOCKETS_G(strerror_buf) = NULL;
547547
}
548548

549+
#ifdef PHP_WIN32
550+
zend_hash_clean(&SOCKETS_G(wsa_info));
551+
#endif
552+
549553
return SUCCESS;
550554
}
551555
/* }}} */

0 commit comments

Comments
 (0)