diff options
author | uzhas <uzhas@ydb.tech> | 2023-10-18 11:05:19 +0300 |
---|---|---|
committer | uzhas <uzhas@ydb.tech> | 2023-10-18 12:02:22 +0300 |
commit | 43c2d4efe0ae828446f3e927f0dc5e89c24a57c1 (patch) | |
tree | 0d60979b4419893cac1f5de928148b2f6b9f4fb3 | |
parent | bf3f1b1d9f38b4cfe7523dc4b83180b0c608801b (diff) | |
download | ydb-43c2d4efe0ae828446f3e927f0dc5e89c24a57c1.tar.gz |
fix coverity issue: use after move
-rw-r--r-- | ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h b/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h index 3e260acff71..aeb48b9736e 100644 --- a/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h +++ b/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h @@ -145,9 +145,9 @@ private: newResolutionTable.emplace( std::move(hostname), std::move(resolvedAddress)); } else { - if (DnsResolutionTable.contains(hostname)) { - newResolutionTable.emplace( - std::move(hostname), DnsResolutionTable.at(hostname)); + auto it = DnsResolutionTable.find(hostname); + if (it != DnsResolutionTable.end()) { + newResolutionTable.emplace(std::move(hostname), it->second); } } } |