From f327d80143f9296b0ccc79362a8faa8690612d71 Mon Sep 17 00:00:00 2001 From: Pavel Vasin Date: Thu, 10 Jan 2013 14:54:22 +0400 Subject: [PATCH] fix use-after-free at exit --- src/init.c | 2 ++ src/pragha.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index 0b0b54f9..6340b8e7 100644 --- a/src/init.c +++ b/src/init.c @@ -798,6 +798,8 @@ void state_free (struct con_state *cstate) g_free(cstate->last_folder); + pragha_mutex_free(cstate->curr_mobj_mutex); + g_slice_free(struct con_state, cstate); } diff --git a/src/pragha.c b/src/pragha.c index d2f9ddbd..6b387efa 100644 --- a/src/pragha.c +++ b/src/pragha.c @@ -36,7 +36,6 @@ static void common_cleanup(struct con_win *cwin) g_object_unref (cwin->backend); gui_free (cwin); state_free (cwin->cstate); - pragha_mutex_free(cwin->cstate->curr_mobj_mutex); g_object_unref(G_OBJECT(cwin->preferences)); preferences_free (cwin->cpref); db_free (cwin->cdbase);