decoder/audiofile: allocate AFvirtualfile with malloc()
afCloseFile() uses free(), so we need to use malloc().
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user