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
This commit is contained in:
Vitaliy Gusev 2023-03-06 12:30:44 +01:00 committed by Corvin Köhne
parent 89fe7b98fe
commit b64ba24264
No known key found for this signature in database
GPG Key ID: D854DA56315E026A

View File

@ -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);
}