summaryrefslogtreecommitdiff
path: root/src/view.c
diff options
context:
space:
mode:
authorportix <none@none>2012-11-18 18:53:46 +0100
committerportix <none@none>2012-11-18 18:53:46 +0100
commitf126e00cd9d055dc445cbd1ccda552d62c947703 (patch)
tree83f41608aa1c588b23e6bb4a21fee045037a98a0 /src/view.c
parentaed534065ca59cda04b615cbfe26df40669ceefa (diff)
downloaddwb-f126e00cd9d055dc445cbd1ccda552d62c947703.zip
Free websettings when destroying a tab; fixing memory leak in dwb_get_scripts if script is a symlink
Diffstat (limited to 'src/view.c')
-rw-r--r--src/view.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view.c b/src/view.c
index 6b6ea1dd..fce39553 100644
--- a/src/view.c
+++ b/src/view.c
@@ -843,7 +843,8 @@ view_set_normal_style(GList *gl) {
static void
view_init_settings(GList *gl) {
View *v = gl->data;
- webkit_web_view_set_settings(WEBKIT_WEB_VIEW(v->web), webkit_web_settings_copy(dwb.state.web_settings));
+ v->settings = webkit_web_settings_copy(dwb.state.web_settings);
+ webkit_web_view_set_settings(WEBKIT_WEB_VIEW(v->web), v->settings);
GList *l;
for (l = g_hash_table_get_values(dwb.settings); l; l=l->next) {
WebSettings *s = l->data;
@@ -1057,7 +1058,7 @@ view_clean(GList *gl) {
g_object_unref(v->hover.element);
g_object_unref(v->status_element);
-
+ g_object_unref(v->settings);
/* Destroy widget */
gtk_widget_destroy(v->web);
gtk_widget_destroy(v->scroll);