summaryrefslogtreecommitdiff
path: root/src/gui/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-01-21 21:04:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-01-21 21:04:15 (GMT)
commitcbf3d6a202489a0a8d2ce4fe8aef31e78bbc653f (patch)
tree93cfe533694097b44d1cb564426c6721aea3aaeb /src/gui/core
parente10081897750e74dfd01266606870aab3638cfbf (diff)
Fixed a Use-After-Free when displaying loaded dark theme path.
Diffstat (limited to 'src/gui/core')
-rw-r--r--src/gui/core/theme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/core/theme.c b/src/gui/core/theme.c
index daf0bfe..420fb79 100644
--- a/src/gui/core/theme.c
+++ b/src/gui/core/theme.c
@@ -285,8 +285,6 @@ static void load_css_partial_content(char **content, const char *path, gboolean
else
file = g_file_new_for_path(dark_path);
- free(dark_path);
-
gtk_css_provider_load_from_file(provider, file, &error);
g_object_unref(G_OBJECT(file));
@@ -307,6 +305,8 @@ static void load_css_partial_content(char **content, const char *path, gboolean
else
g_error_free(error);
+ free(dark_path);
+
g_object_unref(G_OBJECT(provider));
}