Commit b4c4a295e6 for qemu.org

commit b4c4a295e67463f107126b8fd3113c1d5c071870
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Date:   Thu Sep 3 15:43:43 2026 +0400

    tests/launchupdate-test: correct g_auto usage

    g_free() isn't the appropriate way to release those types.

    Fixes: 0b70c6ce7b31 ("Add functional and unit tests for the vm-launch-update device")
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Tested-by: Gerd Hoffmann <kraxel@redhat.com>
    Acked-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

diff --git a/tests/qtest/launchupdate-test.c b/tests/qtest/launchupdate-test.c
index 225c843df5..ed007cdce2 100644
--- a/tests/qtest/launchupdate-test.c
+++ b/tests/qtest/launchupdate-test.c
@@ -192,8 +192,8 @@ static guint32 match_string(char *serial_f, const char *exp_out)
 {
     GError *error = NULL;
     g_autofree gchar *f_contents = NULL;
-    g_autofree GRegex *regex = NULL;
-    g_autofree GMatchInfo *match_info = NULL;
+    g_autoptr(GRegex) regex = NULL;
+    g_autoptr(GMatchInfo) match_info = NULL;
     gsize len;
     guint32 count = 0;
     gboolean ret;
@@ -214,7 +214,6 @@ static guint32 match_string(char *serial_f, const char *exp_out)
         g_match_info_next(match_info, &error);
         count++;
     }
-    g_regex_unref(regex);
     return count;
 }