Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails
MFC after: 1 week Reported by: Coverity CID: 1341474 Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
9bc9176923
commit
8b4e5ab944
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user