summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-12 14:52:00 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-12 14:52:00 (EDT)
commitf40afc0af938a56c4d451e56487c587e5e40eb76 (patch)
treebfa79cfd103e0a1a82e573bb9765b2eebbdc56af
parent4830a1e90c1a66c63d6fb5974382ace2f31dbe44 (diff)
downloadmarquee-f40afc0af938a56c4d451e56487c587e5e40eb76.zip
marquee-f40afc0af938a56c4d451e56487c587e5e40eb76.tar.gz
marquee-f40afc0af938a56c4d451e56487c587e5e40eb76.tar.bz2
MqWebView: Free uri member on finalize
-rw-r--r--src/web-view.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/web-view.c b/src/web-view.c
index 4952ff7..599a6f5 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -55,6 +55,18 @@ G_DEFINE_TYPE(MqWebView, mq_web_view, WEBKIT_TYPE_WEB_VIEW)
WEBKIT_CONTEXT_MENU_ACTION_##ACTION
static void
+finalize(GObject *object)
+{
+ MqWebView *web_view;
+
+ web_view = MQ_WEB_VIEW(object);
+
+ if (web_view->uri) {
+ g_free(web_view->uri);
+ }
+}
+
+static void
get_property(GObject *object, guint property_id, GValue *value,
GParamSpec *pspec)
{
@@ -645,6 +657,7 @@ mq_web_view_class_init(MqWebViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ object_class->finalize = finalize;
object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->set_property = set_property;