about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/tzset.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/time/tzset.c b/time/tzset.c
index d7659008bc..49935c04d3 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -312,13 +312,18 @@ __tzset_internal (always)
 	    {
 	      free (old_tz);
 	      old_tz = NULL;
+	      free (tzbuf);
 	      return;
 	    }
 	}
     }
   else
-    /* There is no DST.  */
-    tz_rules[1].name = tz_rules[0].name;
+    {
+      /* There is no DST.  */
+      tz_rules[1].name = tz_rules[0].name;
+      free (tzbuf);
+      return;
+    }
 
  done_names:
   free (tzbuf);