diff --git a/connected_nfc_tag/hdi_service/connected_nfc_tag_impl.cpp b/connected_nfc_tag/hdi_service/connected_nfc_tag_impl.cpp index 35bb637c60..9b20176b0c 100644 --- a/connected_nfc_tag/hdi_service/connected_nfc_tag_impl.cpp +++ b/connected_nfc_tag/hdi_service/connected_nfc_tag_impl.cpp @@ -73,7 +73,7 @@ int32_t ConnectedNfcTagImpl::RegisterCallBack( HDF_LOGI("%{public}s", __func__); { - std::lock_guard lock(g_callbackMutex); + std::lock_guard guard(g_callbackMutex); if (callbackObj_ != nullptr) { RemoveDeathRecipient(callbackObj_); callbackObj_ = nullptr;