diff --git a/src/core/api/channel_monitor_api.cpp b/src/core/api/channel_monitor_api.cpp index 19ccfe7d1..bb1970edd 100644 --- a/src/core/api/channel_monitor_api.cpp +++ b/src/core/api/channel_monitor_api.cpp @@ -43,7 +43,7 @@ using namespace ot; otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled) { - Utils::ChannelMonitor monitor = static_cast(aInstance)->Get(); + Utils::ChannelMonitor &monitor = static_cast(aInstance)->Get(); return aEnabled ? monitor.Start() : monitor.Stop(); }