Skip to content

Commit

Permalink
Fix handle cleanup in CommandHandler. (project-chip#34262)
Browse files Browse the repository at this point in the history
When a CommandHandler went away, it invalidated its handles, but did not remove
them from the list.  This would cause it to fail a fatal assert when the
non-empty list was destroyed.

The fix is to clear the list once we have invalidated all the handles, since we
no longer need to track them once they have been invalidated.
  • Loading branch information
bzbarsky-apple authored Jul 9, 2024
1 parent c91c3e0 commit 853d9ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/CommandHandlerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ void CommandHandlerImpl::InvalidateHandles()
{
handle->Invalidate();
}
mpHandleList.Clear();
}

void CommandHandlerImpl::IncrementHoldOff(Handle * apHandle)
Expand Down

0 comments on commit 853d9ca

Please sign in to comment.