mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-19 00:04:04 +01:00
Fix memory leak with dual file stereo
This commit is contained in:
parent
36b9e8a280
commit
fd99eeeb61
@ -737,6 +737,8 @@ VGMSTREAM* allocate_vgmstream(int channel_count, int loop_flag) {
|
|||||||
|
|
||||||
mixing_init(vgmstream); /* pre-init */
|
mixing_init(vgmstream); /* pre-init */
|
||||||
|
|
||||||
|
/* BEWARE: try_dual_file_stereo does some free'ing too */
|
||||||
|
|
||||||
//vgmstream->stream_name_size = STREAM_NAME_SIZE;
|
//vgmstream->stream_name_size = STREAM_NAME_SIZE;
|
||||||
return vgmstream;
|
return vgmstream;
|
||||||
fail:
|
fail:
|
||||||
@ -1203,6 +1205,7 @@ static void try_dual_file_stereo(VGMSTREAM* opened_vgmstream, STREAMFILE* sf, VG
|
|||||||
|
|
||||||
/* discard the second VGMSTREAM */
|
/* discard the second VGMSTREAM */
|
||||||
mixing_close(new_vgmstream);
|
mixing_close(new_vgmstream);
|
||||||
|
free(new_vgmstream->tmpbuf);
|
||||||
free(new_vgmstream->start_vgmstream);
|
free(new_vgmstream->start_vgmstream);
|
||||||
free(new_vgmstream);
|
free(new_vgmstream);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user