gce_snitch: Fix use-after-move in load_config()
The use-after-move is not very harmful as it's only used when handling exception. So user would be left with a bogus message. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Closes #15054
This commit is contained in:
committed by
Nadav Har'El
parent
c82f1d2f57
commit
9400b79658
@@ -40,7 +40,7 @@ future<> gce_snitch::load_config() {
|
||||
meta_server_url = _meta_server_url;
|
||||
}
|
||||
|
||||
return gce_api_call(std::move(meta_server_url), ZONE_NAME_QUERY_REQ).then([this, meta_server_url] (sstring az) {
|
||||
return gce_api_call(meta_server_url, ZONE_NAME_QUERY_REQ).then([this, meta_server_url] (sstring az) {
|
||||
if (az.empty()) {
|
||||
return make_exception_future(std::runtime_error(format("Got an empty zone name from the GCE meta server {}", meta_server_url)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user