Merge pull request #8611 from dgquintas/rr_vtable_fix_woops

RR: Don't copy user_data if no vtable
pull/8602/head
David G. Quintas 8 years ago committed by GitHub
commit ea14e0e2a0
  1. 6
      src/core/ext/lb_policy/round_robin/round_robin.c

@ -678,8 +678,10 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx,
sd->index = subchannel_idx;
sd->subchannel = subchannel;
sd->user_data_vtable = addresses->user_data_vtable;
sd->user_data =
sd->user_data_vtable->copy(addresses->addresses[i].user_data);
if (sd->user_data_vtable != NULL) {
sd->user_data =
sd->user_data_vtable->copy(addresses->addresses[i].user_data);
}
++subchannel_idx;
grpc_closure_init(&sd->connectivity_changed_closure,
rr_connectivity_changed, sd);

Loading…
Cancel
Save