mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Fixed memory leak in example, ref. https://github.com/espressif/esp-idf/issues/209
This commit is contained in:
parent
66647bb5bd
commit
8aa5082baa
@ -87,10 +87,10 @@ esp_err_t save_run_time(void)
|
||||
required_size += sizeof(uint32_t);
|
||||
run_time[required_size / sizeof(uint32_t) - 1] = xTaskGetTickCount() * portTICK_PERIOD_MS;
|
||||
err = nvs_set_blob(my_handle, "run_time", run_time, required_size);
|
||||
if (err != ESP_OK) return err;
|
||||
|
||||
free(run_time);
|
||||
|
||||
if (err != ESP_OK) return err;
|
||||
|
||||
// Commit
|
||||
err = nvs_commit(my_handle);
|
||||
if (err != ESP_OK) return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user