From 0ab36aab2e1e630916b5e8499c7888970d8d59c0 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sat, 11 Dec 2010 10:06:43 +0100 Subject: [PATCH] more memory cleanup --- zathura.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zathura.c b/zathura.c index e6235e8..e1a9289 100644 --- a/zathura.c +++ b/zathura.c @@ -4005,8 +4005,16 @@ cb_destroy(GtkWidget* widget, gpointer data) if(Zathura.PDF.document) close_file(FALSE); - /* clean up other variables */ + /* clean up bookmarks */ g_free(Zathura.Bookmarks.file); + if (Zathura.Bookmarks.data) + g_key_file_free(Zathura.Bookmarks.data); + + /* destroy mutexes */ + g_static_mutex_free(&(Zathura.Lock.pdflib_lock)); + g_static_mutex_free(&(Zathura.Lock.search_lock)); + g_static_mutex_free(&(Zathura.Lock.pdf_obj_lock)); + g_static_mutex_free(&(Zathura.Lock.select_lock)); /* inotify */ if(Zathura.FileMonitor.monitor)