From 73d17fd4b7877c893f0ca09c9f8f93ce66c7643a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 7 Nov 2021 14:28:37 +0800 Subject: [PATCH] Free find text in correct procedure * src/xwidget.c (Fxwidget_webkit_previous_result): Don't free find text. (Fxwidget_webkit_finish_search): Free find text here instead. --- src/xwidget.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xwidget.c b/src/xwidget.c index b0700b61e54..f95f5f1d7f7 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -2025,12 +2025,6 @@ using `xwidget-webkit-search'. */) webview = WEBKIT_WEB_VIEW (xw->widget_osr); controller = webkit_web_view_get_find_controller (webview); webkit_find_controller_search_previous (controller); - - if (xw->find_text) - { - xfree (xw->find_text); - xw->find_text = NULL; - } unblock_input (); #endif @@ -2063,6 +2057,12 @@ using `xwidget-webkit-search'. */) webview = WEBKIT_WEB_VIEW (xw->widget_osr); controller = webkit_web_view_get_find_controller (webview); webkit_find_controller_search_finish (controller); + + if (xw->find_text) + { + xfree (xw->find_text); + xw->find_text = NULL; + } unblock_input (); #endif -- 2.39.2