From 17b19b4d51a840d6becf992599cd1e17d5344af4 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 31 Oct 2017 05:16:38 -0400 Subject: MqWebView: Free cached main resource data on finalize() Also drop the conditional around URI freeing. g_free() already performs this check. We may be able to avoid the overhead of an unnecessary function call (at the cost of sometimes inaccurate branch prediction), but the resulting code is uglier, especially with lots of g_free() calls. --- (limited to 'src') diff --git a/src/web-view.c b/src/web-view.c index 67e71cd..60a8b75 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -238,9 +238,8 @@ finalize(GObject *object) web_view = MQ_WEB_VIEW(object); - if (web_view->uri) { - g_free(web_view->uri); - } + g_free(web_view->uri); + g_free(web_view->data); G_OBJECT_CLASS(mq_web_view_parent_class)->finalize(object); } -- cgit v0.9.1