fix the file handle leak

This commit is contained in:
Bill Currie 2003-04-21 01:39:07 +00:00
parent efe9dd844f
commit 194c9aa097
2 changed files with 3 additions and 3 deletions

View file

@ -526,8 +526,8 @@ SND_UpdateAmbientSounds (void)
if (!ambient_sfx[ambient_channel]) {
chan->sfx = 0;
continue;
}
chan->sfx = ambient_sfx[ambient_channel]->open (ambient_sfx[ambient_channel]);
} else if (!chan->sfx)
chan->sfx = ambient_sfx[ambient_channel]->open (ambient_sfx[ambient_channel]);
vol = ambient_level->value * l->ambient_sound_level[ambient_channel];
if (vol < 8)

View file

@ -263,7 +263,7 @@ vorbis_stream_open (sfx_t *_sfx)
QFS_FOpenFile (stream->file, &file);
if (!file)
return 0;
puts (stream->file);
sfx = calloc (1, sizeof (sfx_t));
samples = shm->speed * 0.3;
size = samples = (samples + 255) & ~255;