From f40afc0af938a56c4d451e56487c587e5e40eb76 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 12 Oct 2017 14:52:00 -0400 Subject: MqWebView: Free uri member on finalize --- 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; -- cgit v0.9.1