aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 16:23:09 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 16:23:09 +0100
commit2ac549c681ec953f0dacb056de51d2e650113578 (patch)
tree505140d611251a27349ec0e8a7e2f7fcee582d79 /src/satd.c
parentsat only has one queue (diff)
downloadsat-2ac549c681ec953f0dacb056de51d2e650113578.tar.gz
sat-2ac549c681ec953f0dacb056de51d2e650113578.tar.bz2
sat-2ac549c681ec953f0dacb056de51d2e650113578.tar.xz
close state file + unlink before closing to avoid race condition
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/satd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/satd.c b/src/satd.c
index fae8e0b..f69af3b 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -273,8 +273,8 @@ fail:
perror(argv0);
free(path);
if (sock >= 0) {
- close(sock);
unlink(address.sun_path);
+ close(sock);
}
if (state >= 0)
close(state);