diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-09-24 14:01:10 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-09-24 14:01:10 +0100 |
commit | b0372840e7461089412a8ddf705533f9f72f1426 (patch) | |
tree | 4877ccbbd519f655a1171c58a90aa6cc458ee96a | |
parent | ed17760a52a21c9a94719b8f729f2539a2ee6503 (diff) | |
parent | 2a62917444783e62ea5b8c13069aecb77b47ff07 (diff) |
Merge branch 'obsd-master'
-rw-r--r-- | client.c | 6 | ||||
-rw-r--r-- | log.c | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -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); } @@ -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; |