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

Bug#682480: unblock: php5/5.4.5-1



On 2012-07-23 10:47, Ondřej Surý wrote:
> +int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ */
> +{
> +	int fd;
> +
> +	if (!sun || sun->sun_family != AF_UNIX) {
> +		return -1;
> +	}
> +
> +	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
> +		return -1;
> +	}
> +
> +	if (connect(fd, (struct sockaddr *)sun, socklen) == -1) {
Seems to be missing missing a:

                close(fd);

> +		return -1;
> +	}
> +
> +	close(fd);
> +	return 0;
> +}

Anyway, the diff is a bit much for me - so more issues could be in there.

~Niels


Reply to: