Skip to content

Commit defb608

Browse files
bzbarsky-appleaustina-csa
authored andcommitted
Fix handle cleanup in CommandHandler. (project-chip#34262)
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.
1 parent 44ab9ae commit defb608

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/app/CommandHandlerImpl.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ void CommandHandlerImpl::InvalidateHandles()
323323
{
324324
handle->Invalidate();
325325
}
326+
mpHandleList.Clear();
326327
}
327328

328329
void CommandHandlerImpl::IncrementHoldOff(Handle * apHandle)

0 commit comments

Comments
 (0)