diff --git a/src/engine/fileOpsSample.cpp b/src/engine/fileOpsSample.cpp index aed0db7b8..1e4159a37 100644 --- a/src/engine/fileOpsSample.cpp +++ b/src/engine/fileOpsSample.cpp @@ -113,6 +113,7 @@ std::vector DivEngine::sampleFromFile(const char* path) { logW("did not read entire sample bank file buffer!"); lastError=_("did not read entire sample bank file!"); delete[] buf; + fclose(f); return ret; } fclose(f); @@ -271,6 +272,7 @@ std::vector DivEngine::sampleFromFile(const char* path) { delete sample; return ret; } + fclose(f); BUSY_END; ret.push_back(sample); return ret;