diff options
author | Mark D. Roth <roth@google.com> | 2016-09-09 14:45:00 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-09-09 14:45:00 -0700 |
commit | 38525a9a082df5c8a61efe046cde9cb14ae4170c (patch) | |
tree | 084cb7cd7d8e9c33b032afb00b3db61623130d0a /src/core/ext/resolver | |
parent | 90f49f58a555bb24fb13588b638fa4c795514358 (diff) |
Fix use-after-free bug.
Diffstat (limited to 'src/core/ext/resolver')
-rw-r--r-- | src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 328c7cb6f9..5c59e4397a 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -120,8 +120,8 @@ static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, sockaddr_resolver *r) { if (r->next_completion != NULL && !r->published) { r->published = true; - *r->target_result = - grpc_resolver_result_create(r->addresses, r->lb_policy_name); + *r->target_result = grpc_resolver_result_create( + grpc_addresses_copy(r->addresses), r->lb_policy_name); grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL); r->next_completion = NULL; } |