[geany/geany] 110b7c: vte: Free VteFunctions after destroying the widget

Colomban Wendling git-noreply at xxxxx
Sat Oct 24 20:39:16 UTC 2020


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sat, 24 Oct 2020 20:39:16 UTC
Commit:      110b7c839b70c10cebed676434a5e4bef89b2dbc
             https://github.com/geany/geany/commit/110b7c839b70c10cebed676434a5e4bef89b2dbc

Log Message:
-----------
vte: Free VteFunctions after destroying the widget

The widget could possibly still emit signal or otherwise lead to
calling our code, which might still use VteFunctions pointers.
So, move the freeing of it after other cleanups.


Modified Paths:
--------------
    src/vte.c

Modified: src/vte.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -396,7 +396,6 @@ static void create_vte(void)
 
 void vte_close(void)
 {
-	g_free(vf);
 	/* free the vte widget before unloading vte module
 	 * this prevents a segfault on X close window if the message window is hidden */
 	g_signal_handlers_disconnect_by_func(vc->vte, G_CALLBACK(vte_start), NULL);
@@ -407,6 +406,7 @@ void vte_close(void)
 	g_free(vc->font);
 	g_free(vc->send_cmd_prefix);
 	g_free(vc);
+	g_free(vf);
 	g_free(gtk_menu_key_accel);
 	/* Don't unload the module explicitly because it causes a segfault on FreeBSD. The segfault
 	 * happens when the app really exits, not directly on g_module_close(). This still needs to



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list