diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 5efccc08511..59ecbebdfea 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); }