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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 2620413002: Fix various memory leaks in unit tests detected by a new version of ASAN. (Closed)
Patch Set: . Created 3 years, 11 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/native_api_impl.cc ('k') | runtime/vm/timeline_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.cc
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 79b5b1b907a8b9599fcaff1b479a69652c923969..fec51a0db35b7ed39d5473956c80e4726fefe83d 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -139,6 +139,8 @@ static void CheckEncodeDecodeMessage(Dart_CObject* root) {
// Check that the two messages are the same.
CompareDartCObjects(root, new_root);
+
+ free(buffer);
}
@@ -147,6 +149,7 @@ static void ExpectEncodeFail(Dart_CObject* root) {
ApiMessageWriter writer(&buffer, &malloc_allocator);
const bool result = writer.WriteCMessage(root);
EXPECT_EQ(false, result);
+ free(buffer);
}
@@ -1653,6 +1656,7 @@ UNIT_TEST_CASE(MismatchedSnapshotKinds) {
EXPECT(isolate == NULL);
EXPECT(error != NULL);
EXPECT_SUBSTRING("got 'script', expected 'core'", error);
+ free(error);
}
{
« no previous file with comments | « runtime/vm/native_api_impl.cc ('k') | runtime/vm/timeline_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698