diff options
author | Lawrence L Love <lawrencex.l.love@intel.com> | 2013-12-05 12:28:50 -0800 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-12-10 18:25:51 +0000 |
commit | c181b7fbf4b1c3912424761fec8ac7124640543a (patch) | |
tree | a558d7c611809e92b7b08035155750d20af87884 /cli | |
parent | 0f1c178ae258afa4fd60838fb123a6f23d061452 (diff) |
apitrace trim: plug memory leak in trim_trace() (cli_trim.cpp)
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@intel.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli_trim.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cli/cli_trim.cpp b/cli/cli_trim.cpp index 0d96dbb0..ed950e5c 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; } |