svn commit: r365051 - head/usr.sbin/pmc
Eric van Gyzen
vangyzen at FreeBSD.org
Tue Sep 1 15:52:19 UTC 2020
Author: vangyzen
Date: Tue Sep 1 15:52:18 2020
New Revision: 365051
URL: https://svnweb.freebsd.org/changeset/base/365051
Log:
pmc: Fix freed internal location read
Coverity detected this error. The fix duplicates the assignment on line 171.
Submitted by: bret_ketchum at dell.com
Reported by: Coverity
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D26227
Modified:
head/usr.sbin/pmc/cmd_pmc_summary.cc
Modified: head/usr.sbin/pmc/cmd_pmc_summary.cc
==============================================================================
--- head/usr.sbin/pmc/cmd_pmc_summary.cc Tue Sep 1 15:33:57 2020 (r365050)
+++ head/usr.sbin/pmc/cmd_pmc_summary.cc Tue Sep 1 15:52:18 2020 (r365051)
@@ -156,7 +156,7 @@ pmc_summary_handler(int logfd, int k, bool do_full)
auto rate = ratemap[kv.first];
std::cout << "idx: " << kv.first << " name: " << name << " rate: " << rate << std::endl;
while (!kv.second.empty()) {
- auto &val = kv.second.back();
+ auto val = kv.second.back();
kv.second.pop_back();
std::cout << val.second << ": " << val.first << std::endl;
}
More information about the svn-src-all
mailing list