logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 94c50148edca27ef02c4af86e9be60127fef3539
parent fff8dbebb26f368400888a4d6e138f570bf0c2b0
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 22 Aug 2020 08:15:32 +0200

badwolf.c: unref web_context and settings, let widget_destroy remove the page

Diffstat:

Mbadwolf.c5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -72,9 +72,6 @@ WebViewCb_close(WebKitWebView *webView, gpointer user_data) { (void)webView; struct Client *browser = (struct Client *)user_data; - GtkNotebook *notebook = GTK_NOTEBOOK(browser->window->notebook); - - gtk_notebook_remove_page(notebook, gtk_notebook_page_num(GTK_NOTEBOOK(notebook), browser->box)); gtk_widget_destroy(browser->box); @@ -664,6 +661,8 @@ new_browser(struct Window *window, const gchar *target_url, WebKitWebView *relat settings, NULL)); gtk_widget_set_name(GTK_WIDGET(browser->webView), "browser__webView"); + g_object_unref(web_context); + g_object_unref(settings); gtk_box_pack_start( GTK_BOX(browser->toolbar), GTK_WIDGET(browser->back), FALSE, FALSE, BADWOLF_TOOLBAR_PADDING);