mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_memory_leak_in_pre_encrypted_ota_example' into 'master'
example: fix memory leak in pre_encrypted_ota example. Closes IDFGH-7978 See merge request espressif/esp-idf!19414
This commit is contained in:
commit
21db02c510
@ -84,7 +84,11 @@ static esp_err_t _decrypt_cb(decrypt_cb_arg_t *args, void *user_ctx)
|
||||
// It is unlikely to not have App Descriptor available in first iteration of decrypt callback.
|
||||
assert(args->data_out_len >= app_desc_offset + sizeof(esp_app_desc_t));
|
||||
esp_app_desc_t *app_info = (esp_app_desc_t *) &args->data_out[app_desc_offset];
|
||||
return validate_image_header(app_info);
|
||||
err = validate_image_header(app_info);
|
||||
if (err != ESP_OK) {
|
||||
free(pargs.data_out);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
args->data_out_len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user