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 - Loading MIDI music using FluidSynth leaks memory.
Summary: Loading MIDI music using FluidSynth leaks memory.
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-15 21:27 UTC by Philipp Wiesemann
Modified: 2015-06-17 07:12 UTC (History)
0 users

See Also:


Attachments
patch for memory leak (506 bytes, patch)
2015-06-16 18:09 UTC, Philipp Wiesemann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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