From: Andrew Stubbs Date: Tue, 18 Oct 2011 20:40:21 +0000 (+0000) Subject: Commit correct version of previous patch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9d662bb75152bb63ada99d46d30d98197a82160;p=gcc.git Commit correct version of previous patch. 2011-10-18 Andrew Stubbs gcc/ * config/arm/driver-arm.c (host_detect_local_cpu): Close the file before exiting. From-SVN: r180168 --- diff --git a/gcc/config/arm/driver-arm.c b/gcc/config/arm/driver-arm.c index c7ca4faa37f..9a6762b4548 100644 --- a/gcc/config/arm/driver-arm.c +++ b/gcc/config/arm/driver-arm.c @@ -75,7 +75,7 @@ host_detect_local_cpu (int argc, const char **argv) { const char *val = NULL; char buf[128]; - FILE *f; + FILE *f = NULL; bool arch; const struct vendor_cpu *cpu_table = NULL; @@ -135,7 +135,8 @@ not_found: unsigned int opt; const char *search[] = {NULL, "arch"}; - fclose (f); + if (f) + fclose (f); search[0] = argv[0]; for (opt = 0; opt < ARRAY_SIZE (search); opt++)