Mercurial > otakunoraifu
diff music2/music.cc @ 7:fa8511a21d05
Fixes somes memory leaks
author | thib |
---|---|
date | Tue, 05 Aug 2008 10:06:04 +0000 |
parents | c4af1e9ab8d1 |
children | 4d7486cb20a9 |
line wrap: on
line diff
--- a/music2/music.cc +++ b/music2/music.cc @@ -220,6 +220,7 @@ void WavChunk::callback(void *userdata, memcpy(stream_dup, stream, len); memset(stream, 0, len); SDL_MixAudio(stream, (Uint8*)stream_dup, len, cur_vol); + delete[] stream_dup; return; } @@ -290,7 +291,7 @@ void MuSys::PlayKoe(const char* path) { } if (playing_koedata) { - delete[] playing_koedata; + free(playing_koedata); playing_koedata = 0; }