| Summary: | Calling Mix_Quit twice with midi support leads to segfault | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Martin Gerhardy <martin.gerhardy> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
Fixed, thanks! http://hg.libsdl.org/SDL_mixer/rev/bbc63f965931 |
the variable soundfont_paths is freed, but not set to NULL. So calling Mix_Quit a second time would crash if SDL_mixer is compiled with midi support. For all the other sound types, it's guarded with if (initialized). So i think it would be good to fix this by setting the soundfont_paths variable to NULL in line 231 of mixer.c diff -r d4f0ea99a069 mixer.c --- a/mixer.c Wed Jul 31 21:45:53 2013 -0700 +++ b/mixer.c Thu Aug 01 10:08:43 2013 +0200 @@ -243,6 +243,7 @@ #ifdef MID_MUSIC if (soundfont_paths) { SDL_free(soundfont_paths); + soundfont_paths = NULL; } #endif initialized = 0;