forked from espressif/esp-idf
fix(vfs): Add missing lock release in vfs_fat_truncate
This commit is contained in:
@@ -1040,6 +1040,7 @@ static int vfs_fat_truncate(void* ctx, const char *path, off_t length)
|
|||||||
res = f_truncate(file);
|
res = f_truncate(file);
|
||||||
|
|
||||||
if (res != FR_OK) {
|
if (res != FR_OK) {
|
||||||
|
_lock_release(&fat_ctx->lock);
|
||||||
ESP_LOGD(TAG, "%s: fresult=%d", __func__, res);
|
ESP_LOGD(TAG, "%s: fresult=%d", __func__, res);
|
||||||
errno = fresult_to_errno(res);
|
errno = fresult_to_errno(res);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
Reference in New Issue
Block a user