fix mem leak

reviewable/pr13883/r5
ncteisen 7 years ago
parent ee013d25b3
commit 21687ea63f
  1. 4
      src/core/lib/channel/channel_tracer.cc

@ -100,7 +100,7 @@ ChannelTrace::~ChannelTrace() {
while (it != nullptr) {
TraceEvent* to_free = it;
it = it->next_;
gpr_free(to_free);
Delete<TraceEvent>(to_free);
}
gpr_mu_destroy(&tracer_mu_);
}
@ -123,7 +123,7 @@ void ChannelTrace::AddTraceEventHelper(TraceEvent* new_trace_event) {
if (list_size_ > max_list_size_) {
TraceEvent* to_free = head_trace_;
head_trace_ = head_trace_->next_;
gpr_free(to_free);
Delete<TraceEvent>(to_free);
--list_size_;
}
}

Loading…
Cancel
Save