mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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:
commit
d1487a5b79
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user