mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 12:17:47 +00:00
[srp-server] avoid re-accessing committed SRP updates (#6785)
We should remove the UpdateMetadata before committing the SRP update to ensure that the same UpdateMetadata (and the Host object) can never be touched again.
This commit is contained in:
@@ -298,9 +298,8 @@ void Server::HandleServiceUpdateResult(ServiceUpdateId aId, Error aError)
|
||||
|
||||
void Server::HandleServiceUpdateResult(UpdateMetadata *aUpdate, Error aError)
|
||||
{
|
||||
CommitSrpUpdate(aError, aUpdate->GetDnsHeader(), aUpdate->GetHost(), aUpdate->GetMessageInfo());
|
||||
|
||||
IgnoreError(mOutstandingUpdates.Remove(*aUpdate));
|
||||
CommitSrpUpdate(aError, aUpdate->GetDnsHeader(), aUpdate->GetHost(), aUpdate->GetMessageInfo());
|
||||
aUpdate->Free();
|
||||
|
||||
if (mOutstandingUpdates.IsEmpty())
|
||||
|
||||
Reference in New Issue
Block a user