Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > by-pkgid > 980f5b0a0cb06ae4486a72dcc0241bbc > files > 24

php-4.3.4-4.6.100mdk.src.rpm

--- php-4.3.8/main/network.c	2004-05-23 12:43:15.000000000 +0200
+++ php-src/main/network.c	2004-07-02 19:23:07.000000000 +0200
@@ -704,8 +704,11 @@
 	
 	memcpy(unix_addr.sun_path, path, pathlen);
 
-	if (php_connect_nonb(socketd, (struct sockaddr *) &unix_addr, sizeof(unix_addr), timeout) == SOCK_CONN_ERR) 
+	if (php_connect_nonb(socketd, (struct sockaddr *) &unix_addr,
+			sizeof(unix_addr), timeout) == SOCK_CONN_ERR) {
+		closesocket(socketd);
 		return NULL;
+	}
 
 	stream = php_stream_sock_open_from_socket_rel(socketd, persistent_id);
 	if (stream == NULL)