Don't pass a NULL pointer to syslog(3).

Submitted by: kris
This commit is contained in:
Alfred Perlstein 2002-10-07 00:58:21 +00:00
parent b241e69d12
commit e9fb8a0e9d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104587

View File

@ -366,6 +366,7 @@ init_transport(struct netconfig *nconf)
oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
if (bind(fd, sa, addrlen) != 0) {
syslog(LOG_ERR, "cannot bind %s on %s: %m",
(hosts[nhostsbak] == NULL) ? "*" :
hosts[nhostsbak], nconf->nc_netid);
if (res != NULL)
freeaddrinfo(res);