From cbf3d6a202489a0a8d2ce4fe8aef31e78bbc653f Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Mon, 21 Jan 2019 22:04:15 +0100
Subject: Fixed a Use-After-Free when displaying loaded dark theme path.

---
 src/gui/core/theme.c | 4 ++--
 1 file 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));
 
     }
-- 
cgit v0.11.2-87-g4458