summaryrefslogtreecommitdiff
path: root/glib.supp
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-11-30 11:04:09 +0000
committerPhilip Withnall <withnall@endlessm.com>2018-12-17 17:16:03 +0000
commite6eb4869ba2354484478834d5af86fc91c7bc107 (patch)
treeff4915ee04513c9255c7ce0a5f42134e5dc703e0 /glib.supp
parenta67eadbdc3d8a317c41cfb011d88de41b271194f (diff)
downloadglib-e6eb4869ba2354484478834d5af86fc91c7bc107.tar.gz
gutils: Refactor initialisation of XDG variables
Split out the code which calculates each XDG variable value from the code which caches it, so that GLib can internally recalculate the variables if needed, without necessarily trashing the user-visible cache. This will be useful in a following commit to add support for explicitly reloading the variables. This commit necessarily reworks how g_get_user_runtime_dir() is structured, since it was inexplicably structured differently from (but equivalently to) the other XDG variable functions. Future refactoring could easily share a lot more code between these g_build_*() functions. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/glib/issues/538
Diffstat (limited to 'glib.supp')
-rw-r--r--glib.supp20
1 files changed, 20 insertions, 0 deletions
diff --git a/glib.supp b/glib.supp
index 9163ee3e1..c8f3682ef 100644
--- a/glib.supp
+++ b/glib.supp
@@ -543,3 +543,23 @@
...
fun:g_object_new_valist
}
+
+# g_get_system_data_dirs() caches a one-time allocation
+{
+ g_get_system_data_dirs
+ Memcheck:Leak
+ fun:malloc
+ ...
+ fun:g_build_system_data_dirs
+ fun:g_get_system_data_dirs
+}
+
+# g_get_user_data_dir() caches a one-time allocation
+{
+ g_get_user_data_dir
+ Memcheck:Leak
+ fun:realloc
+ ...
+ fun:g_build_user_data_dir
+ fun:g_get_user_data_dir
+} \ No newline at end of file