Fixed use of unalloc'd memory

pull/8634/head
David Garcia Quintas 8 years ago
parent 83c45bb19b
commit 4f9b764956
  1. 2
      test/core/client_channel/set_initial_connect_string_test.c

@ -115,8 +115,8 @@ static void reset_addr_and_set_magic_string(grpc_resolved_address **addr,
target.sin_family = AF_INET;
target.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
target.sin_port = htons((uint16_t)server_port);
(*addr)->len = sizeof(target);
*addr = (grpc_resolved_address *)gpr_malloc(sizeof(grpc_resolved_address));
(*addr)->len = sizeof(target);
memcpy((*addr)->addr, &target, sizeof(target));
}

Loading…
Cancel
Save