Commit 60821232 authored by Max Kellermann's avatar Max Kellermann

decoder/audiofile: allocate AFvirtualfile with malloc()

afCloseFile() uses free(), so we need to use malloc().
parent 9b4156a2
......@@ -129,7 +129,7 @@ audiofile_file_seek(AFvirtualfile *vfile, AFfileoffset _offset,
static AFvirtualfile *
setup_virtual_fops(AudioFileInputStream &afis) noexcept
{
AFvirtualfile *vf = new AFvirtualfile();
AFvirtualfile *vf = (AFvirtualfile *)malloc(sizeof(*vf));
vf->closure = &afis;
vf->write = nullptr;
vf->read = audiofile_file_read;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment