Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2015-09-24 14:01:10 +01:00
commit b0372840e7
2 changed files with 8 additions and 1 deletions

View File

@ -153,15 +153,19 @@ retry:
}
fd = server_start(base, lockfd, lockfile);
}
if (locked) {
free(lockfile);
close(lockfd);
}
setblocking(fd, 0);
return (fd);
failed:
if (locked) {
free(lockfile);
close(lockfd);
}
close(fd);
return (-1);
}

3
log.c
View File

@ -42,6 +42,9 @@ log_event_cb(unused int severity, const char *msg)
void
log_open(const char *path)
{
if (log_file != NULL)
fclose(log_file);
log_file = fopen(path, "w");
if (log_file == NULL)
return;