Properly free memory on error

This commit is contained in:
Marcus Weseloh 2018-04-04 11:03:47 +02:00
parent e8717e5b40
commit 352bdef533

View file

@ -429,7 +429,7 @@ int fluid_sffile_read_sample_data(SFData *sf, unsigned int start, unsigned int c
if (loaded_data24 == NULL)
{
FLUID_LOG(FLUID_ERR, "Out of memory");
return FLUID_FAILED;
goto error_exit;
}
if (sf->fcbs->fread(loaded_data24, count, sf->sffd) == FLUID_FAILED)