Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 2023 10:29:29 GMT
From:      =?utf-8?Q?Corvin=20K=C3=B6hne?= <corvink@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: f63fd20a9ac2 - stable/13 - bhyvectl: don't leak nvlist in send_message
Message-ID:  <202303171029.32HATTWV067434@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by corvink:

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

commit f63fd20a9ac2e88c1b9399b3ef8fc8edb693d192
Author:     Vitaliy Gusev <gusev.vitaliy@gmail.com>
AuthorDate: 2023-03-06 11:32:17 +0000
Commit:     Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-03-17 10:26:34 +0000

    bhyvectl: don't leak nvlist in send_message
    
    Reviewed by:            corvink, markj
    MFC after:              1 week
    Sponsored by:           vStack
    Differential Revision:  https://reviews.freebsd.org/D38900
    
    (cherry picked from commit 942525ab47e9cd9277ac426e082366d58d7bbe41)
---
 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 59ecbebdfeae..4aa235e00489 100644
--- a/usr.sbin/bhyvectl/bhyvectl.c
+++ b/usr.sbin/bhyvectl/bhyvectl.c
@@ -1704,9 +1704,9 @@ send_message(const char *vmname, nvlist_t *nvl)
 		perror("nvlist_send() failed");
 		err = errno;
 	}
+done:
 	nvlist_destroy(nvl);
 
-done:
 	if (socket_fd >= 0)
 		close(socket_fd);
 	return (err);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303171029.32HATTWV067434>