diff --git a/unix-socket.c b/unix-socket.c index 483c9c448c3964..8f5b849f943232 100644 --- a/unix-socket.c +++ b/unix-socket.c @@ -82,7 +82,7 @@ int unix_stream_connect(const char *path, int disallow_chdir) struct unix_sockaddr_context ctx; if (unix_sockaddr_init(&sa, path, &ctx, disallow_chdir) < 0) - return -1; + goto fail; fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd < 0) goto fail;