Skip to content

Commit

Permalink
Stop holding a reference into a temporary.
Browse files Browse the repository at this point in the history
This was drive-by fixed on tip by
project-chip#23827 but we
should fix on 1.0 too.

Fixes project-chip#24367
  • Loading branch information
bzbarsky-apple committed Jan 11, 2023
1 parent 77ca3d2 commit 44ff13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/AutoCommissioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam

if (params.GetCountryCode().HasValue())
{
auto & code = params.GetCountryCode().Value();
auto code = params.GetCountryCode().Value();
MutableCharSpan copiedCode(mCountryCode);
if (CopyCharSpanToMutableCharSpan(code, copiedCode) == CHIP_NO_ERROR)
{
Expand Down

0 comments on commit 44ff13c

Please sign in to comment.