Skip to content

Commit

Permalink
Fix: Android commissioning complete crash (#22747)
Browse files Browse the repository at this point in the history
When the Thread device is set up first, operationalDatasetBytes has been released, but has not been assigned to nullptr.
After setup a non-Thread device, ReleaseByteArrayElements will be called again, and a crash will occur
  • Loading branch information
panliming-tuya authored and pull[bot] committed Dec 6, 2023
1 parent 1af9fe8 commit 4897561
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controller/java/AndroidDeviceControllerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ void AndroidDeviceControllerWrapper::OnCommissioningComplete(NodeId deviceId, CH
{
env->ReleaseByteArrayElements(operationalDatasetBytes, operationalDataset, 0);
env->DeleteGlobalRef(operationalDatasetBytes);
operationalDatasetBytes = nullptr;
}
}

Expand Down

0 comments on commit 4897561

Please sign in to comment.