realnc / SDL_audiolib

An audio decoding, resampling and mixing library for SDL.
GNU Lesser General Public License v3.0
43 stars 8 forks source link

Memory leak in DecoderDrwav #11

Closed glebm closed 3 years ago

glebm commented 3 years ago
Direct leak of 93280 byte(s) in 212 object(s) allocated from:
    #0 0x7f2939129f17 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xb1f17)
    #1 0x55bf8095616b in Aulib::DecoderDrwav::open(SDL_RWops*) /home/gleb/repos/glebm/SDL_audiolib/src/DecoderDrwav.cpp:82
    #2 0x55bf8095b6c4 in Aulib::Stream::open() /home/gleb/repos/glebm/SDL_audiolib/src/Stream.cpp:66
    #3 0x55bf8077790c in devilution::SoundSample::SetChunk(std::unique_ptr<std::byte [], std::default_delete<std::byte []> >, unsigned int) ../Source/utils/soundsample.cpp:91
    #4 0x55bf8066d7fc in devilution::sound_file_load(char const*, bool) ../Source/sound.cpp:144
    #5 0x55bf801057ac in priv_sound_init ../Source/effects.cpp:1363
    #6 0x55bf8010638d in devilution::sound_init() ../Source/effects.cpp:1392
    #7 0x55bf80139707 in devilution::ShowProgress(devilution::interface_mode) ../Source/interfac.cpp:232
    #8 0x55bf7ffe445b in start_game ../Source/diablo.cpp:298
    #9 0x55bf7ffe46c8 in run_game_loop ../Source/diablo.cpp:365
    #10 0x55bf7ffe4d4b in devilution::StartGame(bool, bool) ../Source/diablo.cpp:453
    #11 0x55bf802666ab in mainmenu_init_menu ../Source/mainmenu.cpp:49
    #12 0x55bf8026670f in mainmenu_single_player ../Source/mainmenu.cpp:59
    #13 0x55bf80266cf1 in devilution::mainmenu_loop() ../Source/mainmenu.cpp:128
    #14 0x55bf7ffe781a in devilution::DiabloMain(int, char**) ../Source/diablo.cpp:725
    #15 0x55bf80266427 in main ../Source/main.cpp:34
    #16 0x7f2937f6dcb1 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x28cb1)