summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-31 05:16:38 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-31 05:18:15 (EDT)
commit17b19b4d51a840d6becf992599cd1e17d5344af4 (patch)
treefee4633f507216a1c3a6cce6329992ca1ef93b42 /src
parent1582f0c7dcac898cbebda188c86071bcc32ecb03 (diff)
downloadmarquee-17b19b4d51a840d6becf992599cd1e17d5344af4.zip
marquee-17b19b4d51a840d6becf992599cd1e17d5344af4.tar.gz
marquee-17b19b4d51a840d6becf992599cd1e17d5344af4.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/web-view.c5
1 files changed, 2 insertions, 3 deletions
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);
}