diff options
author | David G. Quintas <dgq@google.com> | 2016-11-04 00:29:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-04 00:29:25 +0100 |
commit | 90d726fdd37174a29293e87d9bfbf10c9de68c16 (patch) | |
tree | 435d208d4edebab044e8b5a523a77a2e0aafd191 | |
parent | 83c45bb19b1401b2f7ad3919de0a6dc731a230ea (diff) | |
parent | 4f9b7649564f7a909da417ba57c02c9521a52693 (diff) |
Merge pull request #8634 from dgquintas/order_of_things
Fixed use of unalloc'd memory
-rw-r--r-- | test/core/client_channel/set_initial_connect_string_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index 379f30fb9f..d93cad57b4 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/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)); } |