Merge pull request #6 from ucloud/bugfix_ota_destory

bug fix ota destory
This commit is contained in:
杜敏敏 2021-05-24 18:35:06 +08:00 committed by GitHub
commit 57c3fded56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -282,7 +282,6 @@ int IOT_OTA_Destroy(void *handle)
}
osc_deinit(h_ota->ch_signal);
ofc_deinit(h_ota->ch_fetch);
ota_lib_md5_deinit(h_ota->md5);
if (NULL != h_ota->url) {
@ -305,6 +304,14 @@ int IOT_OTA_Destroy(void *handle)
HAL_Free(h_ota->download_name);
}
if (NULL != h_ota->current_version) {
HAL_Free(h_ota->current_version);
}
if (NULL != h_ota->taskID) {
HAL_Free(h_ota->taskID);
}
HAL_Free(h_ota);
return SUCCESS_RET;
}