decoder/audiofile: allocate AFvirtualfile with malloc()
afCloseFile() uses free(), so we need to use malloc().
This commit is contained in:
parent
9b4156a282
commit
60821232b9
@ -129,7 +129,7 @@ audiofile_file_seek(AFvirtualfile *vfile, AFfileoffset _offset,
|
|||||||
static AFvirtualfile *
|
static AFvirtualfile *
|
||||||
setup_virtual_fops(AudioFileInputStream &afis) noexcept
|
setup_virtual_fops(AudioFileInputStream &afis) noexcept
|
||||||
{
|
{
|
||||||
AFvirtualfile *vf = new AFvirtualfile();
|
AFvirtualfile *vf = (AFvirtualfile *)malloc(sizeof(*vf));
|
||||||
vf->closure = &afis;
|
vf->closure = &afis;
|
||||||
vf->write = nullptr;
|
vf->write = nullptr;
|
||||||
vf->read = audiofile_file_read;
|
vf->read = audiofile_file_read;
|
||||||
|
Loading…
Reference in New Issue
Block a user