Skip to content

Commit

Permalink
bhyvectl: correct socket_fd closing in send_message
Browse files Browse the repository at this point in the history
Reviewed by:		corvink, markj
MFC after:		1 week
Sponsored by:		vStack
Differential Revision:	https://reviews.freebsd.org/D38889
  • Loading branch information
gusev-vitaliy authored and ckoehne committed Mar 6, 2023
1 parent 89fe7b9 commit b64ba24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr.sbin/bhyvectl/bhyvectl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b64ba24

Please sign in to comment.