Skip to content
Snippets Groups Projects
Commit 5bdcd237 authored by David Garcia Quintas's avatar David Garcia Quintas
Browse files

RR: Don't copy user_data is no vtable

parent 11948f74
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment