Author: ngie Date: Fri May 13 09:50:38 2016 New Revision: 299650 URL: https://svnweb.freebsd.org/changeset/base/299650
Log: MFstable/10 r299649: MFC r298842: Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails CID: 1341474 Modified: stable/9/lib/libkvm/kvm_amd64.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_amd64.c ============================================================================== --- stable/9/lib/libkvm/kvm_amd64.c Fri May 13 09:49:52 2016 (r299649) +++ stable/9/lib/libkvm/kvm_amd64.c Fri May 13 09:50:38 2016 (r299650) @@ -200,6 +200,7 @@ _kvm_initvtop(kvm_t *kd) PML4 = _kvm_malloc(kd, PAGE_SIZE); if (kvm_read(kd, pa, PML4, PAGE_SIZE) != PAGE_SIZE) { _kvm_err(kd, kd->program, "cannot read KPML4phys"); + free(PML4); return (-1); } kd->vmst->PML4 = PML4; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"