appl/kf: doit close socket before returning

Change-Id: Ida564ea4c27c1bd50004340ac7dbab5f11dbf531
This commit is contained in:
Jeffrey Altman
2022-01-17 16:50:04 -05:00
parent 27a2ad7bfc
commit 3a52803e19

View File

@@ -312,7 +312,9 @@ doit (const char *hostname, int port, const char *svc,
continue;
}
freeaddrinfo (ai);
return proto (s, hostname, svc, message, len);
error = proto(s, hostname, svc, message, len);
close(s);
return error;
}
warnx ("failed to contact %s", hostname);
freeaddrinfo (ai);