The parse_call() function allocates an object and returns a pointer,
so we need to explicitly call delete on that object.
/* There's no use doing any work past the last call requested
* by the user. */
- if (call->no > options->calls.getLast())
+ if (call->no > options->calls.getLast()) {
+ delete call;
break;
+ }
/* If requested, ignore all calls not belonging to the specified thread. */
- if (options->thread != -1 && call->thread_id != options->thread)
+ if (options->thread != -1 && call->thread_id != options->thread) {
+ delete call;
continue;
+ }
/* Also, prune if uninteresting (unless the user asked for no pruning. */
if (options->prune_uninteresting && call->flags & trace::CALL_FLAG_UNINTERESTING) {
+ delete call;
continue;
}
if (options->dependency_analysis) {
analyzer.analyze(call);
}
+
+ delete call;
}
/* Prepare output file and writer for output. */