Date: Tue, 29 May 2018 18:26:13 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334345 - head/lib/libpmc Message-ID: <201805291826.w4TIQD9e084158@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Tue May 29 18:26:12 2018 New Revision: 334345 URL: https://svnweb.freebsd.org/changeset/base/334345 Log: libpmc: free allocated string on return from pmc_allocate Reported by: Coverity CID: 1391359 Modified: head/lib/libpmc/libpmc.c Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue May 29 18:03:48 2018 (r334344) +++ head/lib/libpmc/libpmc.c Tue May 29 18:26:12 2018 (r334345) @@ -2797,6 +2797,7 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0) return (errno); + free(spec_copy); *pmcid = pmc_config.pm_pmcid; return (0); } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805291826.w4TIQD9e084158>