1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2026-10-24 00:49:00 +03:00

gtestutils: Mark a TLS variable as not really a leak

It’s allocated once for the lifetime of each thread, so isn’t really a
leak.

This fixes valgrind reports as in
https://gitlab.gnome.org/GNOME/glib/-/jobs/6975647.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall
2026-09-08 23:04:01 +01:00
parent 9eb9436786
commit 49e512494f

View File

@@ -791,6 +791,7 @@ g_test_print_handler_full (const gchar *string,
last_had_final_newline = g_new0 (gboolean, 1);
*last_had_final_newline = TRUE;
g_private_set (&last_had_newline_key, last_had_final_newline);
g_ignore_leak (last_had_final_newline);
}
GString *output = g_string_new_len (NULL, strlen (string) + 2);