diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-19 02:16:21 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-19 02:36:45 (EDT) |
commit | ededf613455c61e0b7bbd15a7183173e2c6b6076 (patch) | |
tree | 31a0175f8424f0445baee1954a76f4012b2f75cd /src | |
parent | bcbd5b2759c8d4ad7221d6abfaf586a56b9c0da8 (diff) | |
download | marquee-ededf613455c61e0b7bbd15a7183173e2c6b6076.zip marquee-ededf613455c61e0b7bbd15a7183173e2c6b6076.tar.gz marquee-ededf613455c61e0b7bbd15a7183173e2c6b6076.tar.bz2 |
src/tab-chrome.c: Free temporary tab history list item URI string
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 9326ca0..6b373e7 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -118,6 +118,7 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event, GtkTextBuffer *text_buffer; GtkTextIter text_iter; GList *list_item; + gchar *str; GtkWidget *stack; GtkWidget *toggle_button; GtkWidget *box; @@ -165,10 +166,10 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event, gtk_list_box_insert(GTK_LIST_BOX(list_box), back_forward_list_item_new(list_item->data, -1), 0); gtk_text_buffer_get_start_iter(text_buffer, &text_iter); - gtk_text_buffer_insert(text_buffer, &text_iter, - g_strdup_printf("%s\n", - webkit_back_forward_list_item_get_uri( - list_item->data)), -1); + str = g_strdup_printf("%s\n", + webkit_back_forward_list_item_get_uri(list_item->data)); + gtk_text_buffer_insert(text_buffer, &text_iter, str, -1); + g_free(str); ++chrome->back_items; } @@ -179,10 +180,10 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event, gtk_list_box_insert(GTK_LIST_BOX(list_box), back_forward_list_item_new(list_item->data, 1), -1); gtk_text_buffer_get_end_iter(text_buffer, &text_iter); - gtk_text_buffer_insert(text_buffer, &text_iter, - g_strdup_printf("\n%s", - webkit_back_forward_list_item_get_uri( - list_item->data)), -1); + str = g_strdup_printf("\n%s", + webkit_back_forward_list_item_get_uri(list_item->data)); + gtk_text_buffer_insert(text_buffer, &text_iter, str, -1); + g_free(str); } /* Set up the stack. */ |