ffconfigFREE( pxFile );
if( FF_isERR( xError ) == pdFALSE )
{
xError = FF_FlushCache( pxFile->pxIOManager ); /* Ensure all modified blocks are flushed to disk! */
}
Fix: move ffconfigFREE(…) after the if block.
Use after free bug in FreeRTOS+FAT 160919a
Version: FreeRTOS-Plus-FAT-160919a-MIT
In fffile.c: FFClose() @ line 2970: