diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc index 780b3735da8..7e546a38bfb 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc @@ -330,6 +330,7 @@ static void on_readable_locked(fd_node* fdn, grpc_error* error) { static void on_readable(void* arg, grpc_error* error) { fd_node* fdn = static_cast(arg); + GRPC_ERROR_REF(error); /* ref owned by lambda */ fdn->ev_driver->work_serializer->Run( [fdn, error]() { on_readable_locked(fdn, error); }, DEBUG_LOCATION); } @@ -359,7 +360,7 @@ static void on_writable_locked(fd_node* fdn, grpc_error* error) { static void on_writable(void* arg, grpc_error* error) { fd_node* fdn = static_cast(arg); - GRPC_ERROR_REF(error); + GRPC_ERROR_REF(error); /* ref owned by lambda */ fdn->ev_driver->work_serializer->Run( [fdn, error]() { on_writable_locked(fdn, error); }, DEBUG_LOCATION); }