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 <>
  • Loading branch information...
1 parent 0f1c178 commit c181b7fbf4b1c3912424761fec8ac7124640543a @lawlove lawlove committed with jrfonseca Dec 5, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 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;

0 comments on commit c181b7f

Please sign in to comment.