1
1
forked from 0ad/0ad

Fixed memory leak

This was SVN commit r1598.
This commit is contained in:
Ykkrosh 2004-12-30 17:27:53 +00:00
parent e72addb945
commit 7efc7a7903

View File

@ -896,6 +896,9 @@ static void SndData_dtor(SndData* sd)
stream_close(&sd->s);
else
al_buf_free(sd->al_buf);
#ifdef OGG_HACK
if(sd->o) ogg_release(sd->o);
#endif
}
@ -990,6 +993,10 @@ if(file_type == FT_OGG)
al_data = &data[0];
al_size = (ALsizei)datasize;
}
else
{
sd->o = NULL;
}
#endif
sd->al_buf = al_buf_alloc(al_data, al_size, sd->al_fmt, sd->al_freq);