Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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>
  • Loading branch information...
commit c181b7fbf4b1c3912424761fec8ac7124640543a 1 parent 0f1c178
@lawlove lawlove authored jrfonseca committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  cli/cli_trim.cpp
View
1  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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.