[PATCH 2/2] apitrace trim: plug memory leak in trim_trace() (cli_trim.cpp)
Lawrence L Love
lawrencex.l.love at intel.com
Thu Oct 24 22:09:51 CEST 2013
From: Lawrence L Love <lawlove at gmail.com>
On final loop of 2nd pass, "delete call" was omitted.
There is a check for the final call in both the 1st and 2nd pass.
But in the 2nd pass, "delete call" was ommited. Added it to plug
the leak.
Signed-off-by: Lawrence L Love <lawrencex.l.love at intel.com>
---
cli/cli_trim.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/cli/cli_trim.cpp b/cli/cli_trim.cpp
index 0d96dbb..ed950e5 100644
--- a/cli/cli_trim.cpp
+++ b/cli/cli_trim.cpp
@@ -295,6 +295,7 @@ trim_trace(const char *filename, struct trim_options *options)
if ((options->calls.empty() || call->no > options->calls.getLast()) &&
(options->frames.empty() || frame > options->frames.getLast())) {
+ delete call;
break;
}
--
1.8.4.rc3
More information about the apitrace
mailing list