Don't leak descriptors to sendmail

This commit is contained in:
Miroslav Lichvar
2011-01-18 18:07:46 +01:00
parent 59c68d240c
commit 9d35b5deac
9 changed files with 38 additions and 0 deletions

View File

@@ -105,6 +105,8 @@ static int sock_initialise(RCL_Instance instance)
return 0;
}
UTI_FdSetCloexec(sockfd);
unlink(path);
if (bind(sockfd, (struct sockaddr *)&s, sizeof (s)) < 0) {
LOG_FATAL(LOGF_Refclock, "bind() failed");