Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed May 20, 2022
1 parent 9490a5f commit 0c7905d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/controller/InvokeInteraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,9 @@ CHIP_ERROR InvokeGroupCommandRequest(Messaging::ExchangeManager * exchangeMgr, c
auto commandSender = chip::Platform::MakeUnique<app::CommandSender>(nullptr, exchangeMgr);
VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY);

error = commandSender->AddRequestData(commandPath, requestCommandData);
SuccessOrExit(error);

error = commandSender->SendGroupCommandRequest(SessionHandle(session));
SuccessOrExit(error);

exit:
chip::Platform::Delete(commandSender.release());
return error;
ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, requestCommandData));
return commandSender->SendGroupCommandRequest(SessionHandle(session));
}

template <typename RequestObjectT>
Expand Down

0 comments on commit 0c7905d

Please sign in to comment.