mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix memory leaks in audiolib. Fixes issue #59.
git-svn-id: https://svn.eduke32.com/eduke32@6202 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
da4081c2b6
commit
e51960b3a2
3 changed files with 3 additions and 0 deletions
|
@ -462,6 +462,7 @@ int32_t MV_PlayFLAC(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t lo
|
|||
/*metadata_flac_stream*/ NULL, error_flac_stream,
|
||||
(void *)fd) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
|
||||
{
|
||||
free(fd);
|
||||
MV_Printf("MV_PlayFLAC: %s\n", FLAC__stream_decoder_get_resolved_state_string(fd->stream));
|
||||
MV_SetErrorCode(MV_InvalidFile);
|
||||
return MV_Error;
|
||||
|
|
|
@ -398,6 +398,7 @@ int32_t MV_PlayVorbis(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t
|
|||
|
||||
if (status < 0)
|
||||
{
|
||||
free(vd);
|
||||
MV_Printf("MV_PlayVorbis: err %d\n", status);
|
||||
MV_SetErrorCode(MV_InvalidFile);
|
||||
return MV_Error;
|
||||
|
|
|
@ -138,6 +138,7 @@ int32_t MV_PlayXMP(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loo
|
|||
|
||||
if ((retval = xmp_load_module_from_memory(xmpd->context, ptr, ptrlength)) != 0)
|
||||
{
|
||||
free(xmpd);
|
||||
MV_Printf("MV_PlayXMP: xmp_load_module_from_memory failed (%i)\n", retval);
|
||||
MV_SetErrorCode(MV_InvalidFile);
|
||||
return MV_Error;
|
||||
|
|
Loading…
Reference in a new issue