This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 6097d93f29 Coverity 1528709: Pointer to local outside scope in
PreWarmSM::state_dns_lookup (#10876)
6097d93f29 is described below
commit 6097d93f2976b729af7781e96526dd952923227f
Author: Bryan Call <[email protected]>
AuthorDate: Thu Nov 30 08:24:51 2023 -0800
Coverity 1528709: Pointer to local outside scope in
PreWarmSM::state_dns_lookup (#10876)
---
src/proxy/http/PreWarmManager.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/proxy/http/PreWarmManager.cc b/src/proxy/http/PreWarmManager.cc
index 82ce2411dc..527de32020 100644
--- a/src/proxy/http/PreWarmManager.cc
+++ b/src/proxy/http/PreWarmManager.cc
@@ -312,15 +312,14 @@ PreWarmSM::state_dns_lookup(int event, void *data)
break;
}
case EVENT_SRV_LOOKUP: {
- _pending_action = nullptr;
+ _pending_action = nullptr;
+ char srv_hostname[MAXDNAME] = {}; // Needs to have the same scope as
hostname
std::string_view hostname;
if (record == nullptr || !record->is_srv()) {
// no SRV record, fallback to default lookup
hostname = _dst->host;
} else {
- char srv_hostname[MAXDNAME] = {0};
-
hostname = std::string_view(srv_hostname);
HostDBInfo *info =