The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=b64ba2426441ed33120ef0d3057417b7c0be6972
commit b64ba2426441ed33120ef0d3057417b7c0be6972 Author: Vitaliy Gusev <[email protected]> AuthorDate: 2023-03-06 11:30:44 +0000 Commit: Corvin Köhne <[email protected]> CommitDate: 2023-03-06 13:03:54 +0000 bhyvectl: correct socket_fd closing in send_message Reviewed by: corvink, markj MFC after: 1 week Sponsored by: vStack Differential Revision: https://reviews.freebsd.org/D38889 --- usr.sbin/bhyvectl/bhyvectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 5efccc085119..59ecbebdfeae 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1707,7 +1707,7 @@ send_message(const char *vmname, nvlist_t *nvl) nvlist_destroy(nvl); done: - if (socket_fd > 0) + if (socket_fd >= 0) close(socket_fd); return (err); }
