]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Simplify tzfile fstat failure code
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 18 Sep 2018 22:02:11 +0000 (15:02 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 18 Sep 2018 22:09:01 +0000 (15:09 -0700)
[BZ #21716]
* time/tzfile.c (__tzfile_read): Simplify slightly.

ChangeLog
time/tzfile.c

index 5d8c0353906631547998242cba47fb2abd4fd091..0be5afdaa0a276fe06799f5b6f106c4c846d48b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Simplify tzfile fstat failure code
+       [BZ #21716]
+       * time/tzfile.c (__tzfile_read): Simplify slightly.
+
        Fix tzfile low-memory assertion failure
        [BZ #21716]
        * time/tzfile.c (__tzfile_read): Check for memory exhaustion
index ea6e94030392fc754118a6a60feffff0c54a7069..72ef75f074cdef8e4f1a0dad26ab19c897dee781 100644 (file)
@@ -168,10 +168,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
 
   /* Get information about the file we are actually using.  */
   if (fstat64 (__fileno (f), &st) != 0)
-    {
-      fclose (f);
-      goto ret_free_transitions;
-    }
+    goto lose;
 
   free ((void *) transitions);
   transitions = NULL;