mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register
Fixes issue where ESP_ERR_NO_MEM was being silently discarded after cleaning up after a failed malloc in usb_host_client_register. Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
This commit is contained in:
committed by
Tomas Rezucha
parent
81c4470f7e
commit
38e9c8dbdf
@@ -818,7 +818,7 @@ alloc_err:
|
|||||||
vSemaphoreDelete(event_sem);
|
vSemaphoreDelete(event_sem);
|
||||||
}
|
}
|
||||||
heap_caps_free(client_obj);
|
heap_caps_free(client_obj);
|
||||||
return ESP_OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t usb_host_client_deregister(usb_host_client_handle_t client_hdl)
|
esp_err_t usb_host_client_deregister(usb_host_client_handle_t client_hdl)
|
||||||
|
Reference in New Issue
Block a user