lib/kadm5: kadm_connect do not close 's' more than once

If 's' is closed before exiting, it must be set to rk_INVALID_SOCKET.

Change-Id: I63caf992aa3a6b2c86c918a660025fc054d396d6
This commit is contained in:
Jeffrey Altman
2022-01-14 23:21:16 -05:00
parent a4e6c33780
commit 923067e099

View File

@@ -530,6 +530,7 @@ kadm_connect(kadm5_client_context *ctx)
if (connect(s, a->ai_addr, a->ai_addrlen) < 0) {
krb5_warn(context, errno, "connect(%s)", hostname);
rk_closesocket(s);
s = rk_INVALID_SOCKET;
continue;
}
break;