From b33243672c79424dcd65b98b9babb87d3041cd2e Mon Sep 17 00:00:00 2001
From: Alexander Schwinn <alexxcons@xfce.org>
Date: Mon, 29 Aug 2022 23:14:25 +0200
Subject: [PATCH] Prevent memory leak (Issue #573)

---
 thunar/thunar-history.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/thunar/thunar-history.c b/thunar/thunar-history.c
index 45cf658d0..81e75ac30 100644
--- a/thunar/thunar-history.c
+++ b/thunar/thunar-history.c
@@ -156,6 +156,9 @@ thunar_history_finalize (GObject *object)
   g_slist_free_full (history->forward_list, g_object_unref);
   g_slist_free_full (history->back_list, g_object_unref);
 
+  if (history->current_directory != NULL)
+    g_object_unref (history->current_directory);
+
   (*G_OBJECT_CLASS (thunar_history_parent_class)->finalize) (object);
 }
 
-- 
GitLab