client_connect(): ensure socket is also reset to -1 on error

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-10-16 20:01:29 +02:00
parent 488e6c2adf
commit 6e863a7872
+1 -1
View File
@@ -48,7 +48,7 @@ int client_connect(void)
if (errno != ENOENT)
warnx("Failed connecting to finit");
close(sd);
return -1;
sd = -1;
}
return sd;