Merge branch 'bugfix/hidh_leak' into 'master'

esp_hid: fix minor memory leak on getting dev reports

See merge request espressif/esp-idf!8631
This commit is contained in:
Ivan Grokhotkov 2020-05-08 02:38:08 +08:00
commit d1487a5b79

View File

@ -301,6 +301,7 @@ esp_err_t esp_hidh_dev_reports_get(esp_hidh_dev_t *dev, size_t *num_reports, esp
for (uint8_t i = 0; i < dev->reports_len; i++) {
if (dr == NULL) {
//error
free(r);
return ESP_FAIL;
}
r[i].map_index = dr->map_index;