MPD client: fix resource leak
This commit is contained in:
parent
f53b717f3b
commit
74b00a921a
|
@ -1925,7 +1925,11 @@ mpd_client_connect_unix (struct mpd_client *self, const char *address,
|
||||||
free (expanded);
|
free (expanded);
|
||||||
|
|
||||||
if (connect (fd, (struct sockaddr *) &sun, sizeof sun))
|
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);
|
mpd_client_finish_connection (self, fd);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue