[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
This commit is contained in:
Kyrylo Tkachov 2016-03-23 10:16:31 +00:00 committed by Kyrylo Tkachov
parent 7397fce2f7
commit 6b32fd17a6
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2016-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
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 <jakub@redhat.com>
PR tree-optimization/70354

View File

@ -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:
{