From: Kyrylo Tkachov Date: Wed, 23 Mar 2016 10:16:31 +0000 (+0000) Subject: [ARM] PR driver/70132: Avoid double fclose in driver-arm.c X-Git-Tag: upstream/12.2.0~48172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b32fd17a601a76ee5d34ec86f77e87a54e88632;p=platform%2Fupstream%2Fgcc.git [ARM] PR driver/70132: Avoid double fclose in driver-arm.c PR driver/70132 * config/arm/driver-arm.c (host_detect_local_cpu): Reorder exit logic to not call fclose twice on file. From-SVN: r234419 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a1eb03..f78ff93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-03-23 Kyrylo Tkachov + + PR driver/70132 + * config/arm/driver-arm.c (host_detect_local_cpu): Reorder exit logic + to not call fclose twice on file. + 2016-03-23 Jakub Jelinek PR tree-optimization/70354 diff --git a/gcc/config/arm/driver-arm.c b/gcc/config/arm/driver-arm.c index 466743b..95dc9d5 100644 --- a/gcc/config/arm/driver-arm.c +++ b/gcc/config/arm/driver-arm.c @@ -128,12 +128,11 @@ host_detect_local_cpu (int argc, const char **argv) } } - fclose (f); - - if (val == NULL) - goto not_found; - - return concat ("-m", argv[0], "=", val, NULL); + if (val) + { + fclose (f); + return concat ("-m", argv[0], "=", val, NULL); + } not_found: {