I see this topic is quite old, but no good solution provided yet and this is most related thread on my search. For me solution which is not causing memory leak is:to add HAL_SD_Init(&hsd) just before f_mount(&SDFatFs, &SDPath, 1). Otherwise I was abl...