Commit b9292a30 authored by caturria's avatar caturria Committed by David Reid

Address leaked pResourceManagerDataSource when invalid input causes sound init to fail.

parent 484a5649
...@@ -76801,6 +76801,7 @@ MA_API ma_result ma_sound_init_from_file_internal(ma_engine* pEngine, const ma_s ...@@ -76801,6 +76801,7 @@ MA_API ma_result ma_sound_init_from_file_internal(ma_engine* pEngine, const ma_s
result = ma_resource_manager_data_source_init_ex(pEngine->pResourceManager, &resourceManagerDataSourceConfig, pSound->pResourceManagerDataSource); result = ma_resource_manager_data_source_init_ex(pEngine->pResourceManager, &resourceManagerDataSourceConfig, pSound->pResourceManagerDataSource);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks);
goto done; goto done;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment