diff options
author | vlad-serikov <vlad-serikov@yandex-team.com> | 2023-02-15 12:21:43 +0300 |
---|---|---|
committer | vlad-serikov <vlad-serikov@yandex-team.com> | 2023-02-15 12:21:43 +0300 |
commit | c3992e57be9667ddbfc41701ed0535b68f542c67 (patch) | |
tree | 22386f1ad2b20fbf9b6aca25469f4890cf63058a | |
parent | 4f56624382f2f901b71fc5fdec8318455dce767f (diff) | |
download | ydb-c3992e57be9667ddbfc41701ed0535b68f542c67.tar.gz |
: Patch fix use-after-free grpc.
-rw-r--r-- | contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc index b65583fcb2..a3f238220d 100644 --- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc +++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc @@ -136,6 +136,7 @@ static void on_writable(void* acp, grpc_error_handle error) { int done; grpc_endpoint** ep = ac->ep; grpc_closure* closure = ac->closure; + std::string addr_str = ac->addr_str; grpc_fd* fd; (void)GRPC_ERROR_REF(error); @@ -221,8 +222,7 @@ finish: TString description = y_absl::StrCat("Failed to connect to remote host: ", str); error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, description); - error = - grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, ac->addr_str); + error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, addr_str); } if (done) { // This is safe even outside the lock, because "done", the sentinel, is |