diff options
author | Yunlian Jiang <yunlian@google.com> | 2017-02-15 23:53:08 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-15 23:53:08 +0000 |
commit | c6f6a94c14c7442be652e8f9ed6726d466dbe04a (patch) | |
tree | dcd0d20fcd1b146b09ca68805149ab8b0cf93e0b /tests | |
parent | ebd85c72be725f3a2c53878ab4901c68c500b5b4 (diff) | |
parent | ea5af814024887c0039d7da912311d27e0f38bf6 (diff) | |
download | extras-c6f6a94c14c7442be652e8f9ed6726d466dbe04a.tar.gz |
Merge "fix potential leak of memory pointed." am: d1506c64ad am: a825c78434 am: 85877ba13e
am: ea5af81402
Change-Id: Ib00d22a850a007049435e856e8326312338b2d3a
Diffstat (limited to 'tests')
-rw-r--r-- | tests/memtest/bandwidth.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/memtest/bandwidth.cpp b/tests/memtest/bandwidth.cpp index c3c05952..aa02e66a 100644 --- a/tests/memtest/bandwidth.cpp +++ b/tests/memtest/bandwidth.cpp @@ -313,6 +313,8 @@ int per_core_bandwidth(int argc, char** argv) { args[i].core = *it; args[i].bench = createBandwidthBenchmarkObject(values); if (!args[i].bench) { + for (int j = 0; j < i; j++) + delete args[j].bench; return -1; } } @@ -348,6 +350,8 @@ int multithread_bandwidth(int argc, char** argv) { args[i].core = -1; args[i].bench = createBandwidthBenchmarkObject(values); if (!args[i].bench) { + for (int j = 0; j < i; j++) + delete args[j].bench; return -1; } } |