summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRyuzakiKK <aasonykk@gmail.com>2018-08-23 22:01:21 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-08-24 14:43:29 +0000
commitb8972e885c73c337de42e6f0434e775bf6edb552 (patch)
treeb544c5be035ff36356416e6436c7db5f8cd04741 /tests
parent2b14ccdf86812eeff06f4b12b7ebe52c057fdaa5 (diff)
downloadgnome-control-center-b8972e885c73c337de42e6f0434e775bf6edb552.tar.gz
tests: free TzInfo
The timezone information is allocated with `tz_info_from_location` but never deallocated. LeakSanitizer complains about this memory leak. ``` Direct leak of 13568 byte(s) in 424 object(s) allocated from: /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:95 #1 0x7f63899bab21 in g_malloc0 (/usr/lib/libglib-2.0.so.0+0x51b21) ../tests/datetime/test-timezone-gfx.c:30 #3 0x7f63899dc76a (/usr/lib/libglib-2.0.so.0+0x7376a) ```
Diffstat (limited to 'tests')
-rw-r--r--tests/datetime/test-timezone-gfx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/datetime/test-timezone-gfx.c b/tests/datetime/test-timezone-gfx.c
index 22619c30c..1c25d4886 100644
--- a/tests/datetime/test-timezone-gfx.c
+++ b/tests/datetime/test-timezone-gfx.c
@@ -29,6 +29,7 @@ test_timezone_gfx (gconstpointer data)
location = locs->pdata[i];
info = tz_info_from_location (location);
selected_offset = tz_location_get_utc_offset (location) / (60.0 * 60.0) + (info->daylight ? -1.0 : 0.0);
+ tz_info_free (info);
filename = g_strdup_printf ("timezone_%s.png", g_ascii_formatd (buf, sizeof (buf), "%g", selected_offset));
path = g_build_filename (pixmap_dir, filename, NULL);