aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/uzbl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uzbl-core.c')
-rw-r--r--src/uzbl-core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index 2a91563..bd0bb2c 100644
--- a/src/uzbl-core.c
+++ b/src/uzbl-core.c
@@ -1145,6 +1145,7 @@ search_text (WebKitWebView *page, GArray *argv, const gboolean forward) {
if (g_strcmp0 (uzbl.state.searchtx, argv_idx(argv, 0)) != 0) {
webkit_web_view_unmark_text_matches (page);
webkit_web_view_mark_text_matches (page, argv_idx(argv, 0), FALSE, 0);
+ g_free (uzbl.state.searchtx);
uzbl.state.searchtx = g_strdup(argv_idx(argv, 0));
}
}
@@ -1164,10 +1165,7 @@ search_clear(WebKitWebView *page, GArray *argv, GString *result) {
(void) result;
webkit_web_view_unmark_text_matches (page);
- if(uzbl.state.searchtx) {
- g_free(uzbl.state.searchtx);
- uzbl.state.searchtx = NULL;
- }
+ uzbl.state.searchtx = strfree (uzbl.state.searchtx);
}
void