Skip to content

Commit 29878fc

Browse files
committed
Fix possible invalid read from hostname going out of scope
1 parent 6589758 commit 29878fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eventstream_rpc/source/EventStreamClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ namespace Aws
260260
}
261261

262262
m_onConnectRequestCallback = m_connectionConfig.GetConnectRequestCallback();
263+
Crt::String hostName;
263264

264265
if (baseError == EVENT_STREAM_RPC_SUCCESS)
265266
{
266267
AWS_ZERO_STRUCT(connOptions);
267-
Crt::String hostName;
268268
if (m_connectionConfig.GetHostName().has_value())
269269
{
270270
hostName = m_connectionConfig.GetHostName().value();

0 commit comments

Comments
 (0)