Subject: bug#51652: Acknowledgement (29.0.50; [PATCH] Fix C-r inside xwidget isearch)

From: Po Lu <[email-masked]>
Date: Sun, 07 Nov 2021 14:30:33 +0800

[email-masked] (GNU bug Tracking System) writes:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  [email-masked]
>
> If you wish to submit further information on this problem, please
> send it to [email-masked].
>
> Please do not send mail to [email-masked] unless you wish
> to report a problem with the Bug-tracking system.

Here's something else I caught:

>From 518f879a2ee2c0fb355187de7bdca0e67fe07aca Mon Sep 17 00:00:00 2001
From: Po Lu <[email-masked]>
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 7944ca5c4b..5384938461 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -2001,12 +2001,6 @@ DEFUN ("xwidget-webkit-previous-result", Fxwidget_webkit_previous_result,
   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
 
@@ -2039,6 +2033,12 @@ DEFUN ("xwidget-webkit-finish-search", Fxwidget_webkit_finish_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.31.1

Thanks.  And sorry for all the noise.