From: Dale Weiler Date: Fri, 26 Mar 2021 23:02:27 +0000 (-0400) Subject: fclose when fopen actually succeeds X-Git-Tag: xonotic-v0.8.5~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=85c79d2f1cc851bb352a686ce8f53bc326f967d8;p=xonotic%2Fgmqcc.git fclose when fopen actually succeeds --- diff --git a/main.cpp b/main.cpp index 1080f8f..eace1d5 100644 --- a/main.cpp +++ b/main.cpp @@ -631,8 +631,8 @@ int main(int argc, char **argv) { FILE *fp = fopen(OPTS_OPTION_STR(OPTION_PROGSRC), "rb"); if (fp) { has_progs_src = true; + fclose(fp); } - fclose(fp); } if (has_progs_src) {