We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3018

Summary: Loading MIDI music using FluidSynth leaks memory.
Product: SDL_mixer Reporter: Philipp Wiesemann <philipp.wiesemann>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.0   
Hardware: All   
OS: All   
Attachments: patch for memory leak

Description Philipp Wiesemann 2015-06-15 21:27:26 UTC
There is a memory leak in fluidsynth.c and fluidsynth_loadsong_RW_internal(). The allocated temporary buffer is not deleted if fluid_player_add_mem() returns FLUID_OK.
Comment 1 Sam Lantinga 2015-06-16 06:37:00 UTC
Sure, do you have a tested patch?

Thanks!
Comment 2 Philipp Wiesemann 2015-06-16 18:09:29 UTC
Created attachment 2179 [details]
patch for memory leak

I attached a patch which fixes the memory leak.
Comment 3 Sam Lantinga 2015-06-17 07:12:07 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_mixer/rev/fe757163b8f7