Date: Fri, 13 May 2016 09:50:38 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299650 - stable/9/lib/libkvm Message-ID: <201605130950.u4D9ocxe088531@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605130950.u4D9ocxe088531>