Skip to content

Commit

Permalink
Merge branch 'obsd-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAdam committed Sep 24, 2015
2 parents ed17760 + 2a62917 commit b037284
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client.c
Expand Up @@ -153,15 +153,19 @@ client_connect(struct event_base *base, char *path, int start_server)
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions log.c
Expand Up @@ -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;
Expand Down

0 comments on commit b037284

Please sign in to comment.