Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Unified Diff: runtime/vm/cpuinfo_test.cc

Issue 1677043003: 1. Fix memory leaks reported by running a simple test using ASAN (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/cpuinfo_macos.cc ('k') | runtime/vm/cpuinfo_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpuinfo_test.cc
diff --git a/runtime/vm/cpuinfo_test.cc b/runtime/vm/cpuinfo_test.cc
index 860c407601276b3ca1538354599609b857c04216..0b6113b75b9b2567d510f76454ee8777237f2011 100644
--- a/runtime/vm/cpuinfo_test.cc
+++ b/runtime/vm/cpuinfo_test.cc
@@ -12,6 +12,8 @@ namespace dart {
UNIT_TEST_CASE(GetCpuModelTest) {
const char* cpumodel = CpuInfo::GetCpuModel();
EXPECT_NE(strlen(cpumodel), 0UL);
+ // caller is responsible for deleting the returned cpumodel string.
+ free(const_cast<char*>(cpumodel));
}
} // namespace dart
« no previous file with comments | « runtime/vm/cpuinfo_macos.cc ('k') | runtime/vm/cpuinfo_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698