aboutsummaryrefslogtreecommitdiff
path: root/contrib/plugins/lockstep.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/plugins/lockstep.c')
-rw-r--r--contrib/plugins/lockstep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index f0cb8792c6..237543b43a 100644
--- a/contrib/plugins/lockstep.c
+++ b/contrib/plugins/lockstep.c
@@ -257,6 +257,7 @@ static bool setup_socket(const char *path)
sockaddr.sun_family = AF_UNIX;
if (g_strlcpy(sockaddr.sun_path, path, pathlen) >= pathlen) {
perror("bad path");
+ close(fd);
return false;
}
@@ -303,6 +304,7 @@ static bool connect_socket(const char *path)
sockaddr.sun_family = AF_UNIX;
if (g_strlcpy(sockaddr.sun_path, path, pathlen) >= pathlen) {
perror("bad path");
+ close(fd);
return false;
}