Commit 43b28bc6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "fix warning: Potential leak of memory pointed to by 'bench'"

parents 20eac2aa d31537bd
......@@ -138,6 +138,7 @@ BandwidthBenchmark *createBandwidthBenchmarkObject(arg_t values) {
if (!bench->setSize(size)) {
printf("Failed to allocate buffers for benchmark.\n");
delete bench;
return NULL;
}
......
......@@ -105,9 +105,11 @@ public:
bool setSize(size_t size) {
if (_src) {
free(_src);
_src = NULL;
}
if (_dst) {
free(_dst);
_dst = NULL;
}
if (size == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment