summaryrefslogtreecommitdiff
path: root/glib/gtimezone.c
diff options
context:
space:
mode:
Diffstat (limited to 'glib/gtimezone.c')
-rw-r--r--glib/gtimezone.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 8195106e0..493d6734f 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -345,7 +345,6 @@ GTimeZone *
g_time_zone_new (const gchar *identifier)
{
GTimeZone *tz;
- GMappedFile *file;
G_LOCK (time_zones);
if (time_zones == NULL)
@@ -391,15 +390,7 @@ g_time_zone_new (const gchar *identifier)
else
filename = g_strdup ("/etc/localtime");
- file = g_mapped_file_new (filename, FALSE, NULL);
- if (file != NULL)
- {
- tz->zoneinfo = g_bytes_new_with_free_func (g_mapped_file_get_contents (file),
- g_mapped_file_get_length (file),
- (GDestroyNotify)g_mapped_file_unref,
- g_mapped_file_ref (file));
- g_mapped_file_unref (file);
- }
+ tz->zoneinfo = g_mapped_file_new (filename, FALSE, NULL);
g_free (filename);
}