aboutsummaryrefslogtreecommitdiff
path: root/liberty-proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'liberty-proto.c')
-rw-r--r--liberty-proto.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/liberty-proto.c b/liberty-proto.c
index e99b659..cf84586 100644
--- a/liberty-proto.c
+++ b/liberty-proto.c
@@ -1925,7 +1925,11 @@ mpd_client_connect_unix (struct mpd_client *self, const char *address,
free (expanded);
if (connect (fd, (struct sockaddr *) &sun, sizeof sun))
- return error_set (e, "%s: %s", "connect", strerror (errno));
+ {
+ error_set (e, "%s: %s", "connect", strerror (errno));
+ xclose (fd);
+ return false;
+ }
mpd_client_finish_connection (self, fd);
return true;