The branch stable/13 has been updated by corvink:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d2da92306a89e62f8858e449318a1183f0181a8b

commit d2da92306a89e62f8858e449318a1183f0181a8b
Author:     Vitaliy Gusev <[email protected]>
AuthorDate: 2023-03-06 11:30:44 +0000
Commit:     Corvin Köhne <[email protected]>
CommitDate: 2023-03-17 10:26:33 +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
    
    (cherry picked from commit b64ba2426441ed33120ef0d3057417b7c0be6972)
---
 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);
 }

Reply via email to