mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
fix file handle leak
This commit is contained in:
parent
beb5438484
commit
097be5a093
1 changed files with 8 additions and 7 deletions
|
@ -161,13 +161,6 @@ SND_ScanChannels (int wait)
|
||||||
#endif
|
#endif
|
||||||
} while (count);
|
} while (count);
|
||||||
Sys_DPrintf ("scanning done.\n");
|
Sys_DPrintf ("scanning done.\n");
|
||||||
for (i = 0; i < MAX_CHANNELS; i++) {
|
|
||||||
ch = &snd_channels[i];
|
|
||||||
if (!ch->sfx)
|
|
||||||
continue;
|
|
||||||
ch->sfx->release (ch->sfx);
|
|
||||||
ch->sfx = 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < MAX_CHANNELS; i++) {
|
for (i = 0; i < MAX_CHANNELS; i++) {
|
||||||
ch = &snd_channels[i];
|
ch = &snd_channels[i];
|
||||||
|
@ -178,6 +171,14 @@ SND_ScanChannels (int wait)
|
||||||
}
|
}
|
||||||
//printf ("count: %d\n", count);
|
//printf ("count: %d\n", count);
|
||||||
}
|
}
|
||||||
|
for (i = 0; i < MAX_CHANNELS; i++) {
|
||||||
|
ch = &snd_channels[i];
|
||||||
|
if (!ch->sfx || !ch->done)
|
||||||
|
continue;
|
||||||
|
ch->sfx->release (ch->sfx);
|
||||||
|
ch->sfx->close (ch->sfx);
|
||||||
|
ch->sfx = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue