From fbde7b753f00b3372abbd7f41649341761e89431 Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Tue, 1 Jun 2021 22:36:36 +0300 Subject: [PATCH] fclose is not required with close_on_free=true --- src/client/sound/ogg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/sound/ogg.c b/src/client/sound/ogg.c index f64f44d8..71cd1cf1 100644 --- a/src/client/sound/ogg.c +++ b/src/client/sound/ogg.c @@ -428,12 +428,13 @@ OGG_PlayTrack(int trackNo) } int res = 0; + + // fclose is not required on error with close_on_free=true ogg_file = stb_vorbis_open_file(f, true, &res, NULL); if (res != 0) { Com_Printf("%s: '%s' is not a valid Ogg Vorbis file (error %i).\n", __func__, ogg_tracks[trackNo], res); - fclose(f); return; }