fix potential memory leak

pull/24200/head
Mark D. Roth 5 years ago
parent 7ddaafadd2
commit 6e241963f2
  1. 5
      src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc

@ -233,7 +233,10 @@ void XdsResolver::Notifier::RunInExecCtx(void* arg, grpc_error* error) {
}
void XdsResolver::Notifier::RunInWorkSerializer(grpc_error* error) {
if (resolver_->xds_client_ == nullptr) return;
if (resolver_->xds_client_ == nullptr) {
GRPC_ERROR_UNREF(error);
return;
}
switch (type_) {
case kLdsUpdate:
resolver_->OnListenerUpdate(std::move(update_));

Loading…
Cancel
Save