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 1003

Summary: FLAC_close does not properly close SDL_RWops structure.
Product: SDL_mixer Reporter: tigerfishdaisy
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: Other   
OS: Windows 7   

Description tigerfishdaisy 2010-05-15 15:38:24 UTC
When a FLAC File is opened using Mix_LoadMUS_RW( ... ), the corresponding music close call does not free the rwops structure.
Comment 1 Sam Lantinga 2011-02-17 13:30:08 UTC
The API doesn't have a 'freesrc' parameter which is usually used to indicate whether you manage the memory or you expect SDL_mixer to own it.  Right now it always assumes that you manage it, which results in memory leaks in the file-based interface.
Comment 2 Sam Lantinga 2011-12-31 15:38:09 UTC
This isn't technically a bug, as I mentioned above.  The API assumes that you manage the life cycle of the rwops structure and close it after Mix_FreeMusic().

There was a memory leak when using the file interface, which has been fixed:
http://hg.libsdl.org/SDL_mixer/rev/565549e046b0

Thanks!