Skip to content

Commit bd94d06

Browse files
Stop holding a reference into a temporary. (#24373)
This was drive-by fixed on tip by #23827 but we should fix on 1.0 too. Fixes #24367
1 parent 77ca3d2 commit bd94d06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controller/AutoCommissioner.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam
100100

101101
if (params.GetCountryCode().HasValue())
102102
{
103-
auto & code = params.GetCountryCode().Value();
103+
auto code = params.GetCountryCode().Value();
104104
MutableCharSpan copiedCode(mCountryCode);
105105
if (CopyCharSpanToMutableCharSpan(code, copiedCode) == CHIP_NO_ERROR)
106106
{

0 commit comments

Comments
 (0)