diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index b36ad1c84423..7d46a85b1cd5 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -133,7 +133,7 @@ vm_open(const char *name) return (vm); err: - vm_destroy(vm); + free(vm); return (NULL); } diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 68cc958e66ec..0f7b9533fe4b 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1950,7 +1950,9 @@ main(int argc, char *argv[]) if (!error) { ctx = vm_open(vmname); if (ctx == NULL) { - printf("VM:%s is not created.\n", vmname); + fprintf(stderr, + "vm_open: %s could not be opened: %s\n", + vmname, strerror(errno)); exit (1); } }