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
This commit is contained in:
Vitaliy Gusev 2023-03-06 12:32:17 +01:00 committed by Oscar Zhao
parent 2d69d671af
commit dd57b86222

View File

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