forked from espressif/esp-idf
esp_ds: ignore releasing mutex if not called from same task
This commit is contained in:
committed by
Mahavir Jain
parent
0ed8499898
commit
501c7d1101
@@ -94,9 +94,11 @@ esp_err_t esp_ds_init_data_ctx(esp_ds_data_ctx_t *ds_data)
|
|||||||
|
|
||||||
void esp_ds_release_ds_lock(void)
|
void esp_ds_release_ds_lock(void)
|
||||||
{
|
{
|
||||||
|
if (xSemaphoreGetMutexHolder(s_ds_lock) == xTaskGetCurrentTaskHandle()) {
|
||||||
/* Give back the semaphore (DS lock) */
|
/* Give back the semaphore (DS lock) */
|
||||||
xSemaphoreGive(s_ds_lock);
|
xSemaphoreGive(s_ds_lock);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
size_t esp_ds_get_keylen(void *ctx)
|
size_t esp_ds_get_keylen(void *ctx)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user