diff --git a/src/platform/nxp/common/OTAImageProcessorImpl.cpp b/src/platform/nxp/common/OTAImageProcessorImpl.cpp index 9844e099b1b2e2..757e3fc33a09eb 100644 --- a/src/platform/nxp/common/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/common/OTAImageProcessorImpl.cpp @@ -44,11 +44,6 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() CHIP_ERROR OTAImageProcessorImpl::Abort() { - if (mImageFile == nullptr) - { - ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); - return CHIP_ERROR_INTERNAL; - } DeviceLayer::PlatformMgr().ScheduleWork(HandleAbort, reinterpret_cast(this)); return CHIP_NO_ERROR; } @@ -308,6 +303,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context) } OTA_CancelImage(); + OTA_ServiceDeInit(); imageProcessor->ReleaseBlock(); } diff --git a/src/platform/nxp/common/OTAImageProcessorImpl.h b/src/platform/nxp/common/OTAImageProcessorImpl.h index 5531378ca7fa16..eefda5bf496182 100644 --- a/src/platform/nxp/common/OTAImageProcessorImpl.h +++ b/src/platform/nxp/common/OTAImageProcessorImpl.h @@ -47,7 +47,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface static void TriggerNewRequestForData(intptr_t context); void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } - void SetOTAImageFile(const char * imageFile) { mImageFile = imageFile; } private: //////////// Actual handlers for the OTAImageProcessorInterface /////////////// @@ -75,7 +74,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTADownloader * mDownloader; OTAImageHeaderParser mHeaderParser; uint32_t mSoftwareVersion; - const char * mImageFile = nullptr; /* Buffer used for transaction storage */ uint8_t mPostedOperationsStorage[NB_PENDING_TRANSACTIONS * TRANSACTION_SZ];