R0.14a patch 1

February 3, 2021

File gets dead-locked when f_open funciton failed with some conditions.

This is because the file is left locked when it is opened with FA_OPEN_APPEND flag and failed the
function due to a seek error.
This commit is contained in:
Christopher Williams
2021-02-04 17:02:02 -07:00
parent 419054dd6c
commit ec204563b1
+3
View File
@@ -3882,6 +3882,9 @@ FRESULT f_open (
#endif #endif
} }
} }
#if FF_FS_LOCK != 0
if (res != FR_OK) dec_lock(fp->obj.lockid); /* Decrement file open counter if seek failed */
#endif
} }
#endif #endif
} }