summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libkvm/kvm_amd64.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c
index 57a8728..32cef2f 100644
--- a/lib/libkvm/kvm_amd64.c
+++ b/lib/libkvm/kvm_amd64.c
@@ -159,6 +159,7 @@ _amd64_initvtop(kvm_t *kd)
}
if (kvm_read2(kd, pa, PML4, AMD64_PAGE_SIZE) != AMD64_PAGE_SIZE) {
_kvm_err(kd, kd->program, "cannot read KPML4phys");
+ free(PML4);
return (-1);
}
kd->vmst->PML4 = PML4;
OpenPOWER on IntegriCloud