Skip to content

Commit

Permalink
[v1.3-branch] : Fixed the crash due to packet buffers running out of …
Browse files Browse the repository at this point in the history
…space in CommandHandlerImpl (#35308)
  • Loading branch information
shripad621git authored Sep 3, 2024
1 parent a5d5d13 commit 38ede42
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/CommandHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ class CommandHandler
{
return CHIP_NO_ERROR;
}
ReturnErrorOnFailure(RollbackResponse());
// The error value of RollbackResponse is not important if it fails, we prioritize
// conveying the error generated by addResponseFunction to the caller.
if (RollbackResponse() != CHIP_NO_ERROR)
{
return err;
}
// If we failed to add a command due to lack of space in the
// packet, we will make another attempt to add the response using
// an additional InvokeResponseMessage.
Expand Down

0 comments on commit 38ede42

Please sign in to comment.