summaryrefslogtreecommitdiffstats
path: root/lib/libvmmapi
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libvmmapi')
-rw-r--r--lib/libvmmapi/vmmapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
index 78ed368..8364dd5 100644
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -111,9 +111,10 @@ vm_destroy(struct vmctx *vm)
{
assert(vm != NULL);
- DESTROY(vm->name);
if (vm->fd >= 0)
close(vm->fd);
+ DESTROY(vm->name);
+
free(vm);
}
@@ -151,7 +152,6 @@ vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa,
bzero(&seg, sizeof(seg));
seg.gpa = gpa;
error = ioctl(ctx->fd, VM_GET_MEMORY_SEG, &seg);
- *ret_hpa = seg.hpa;
*ret_len = seg.len;
return (error);
}
OpenPOWER on IntegriCloud