gdk: Fix an oversight in GdkContentFormats

When clearing a builder, reset the counts to 0.

Otherwise valgrind spots uninitialized memory
use in our testsuite.
This commit is contained in:
Matthias Clasen 2023-06-09 08:12:56 -04:00
parent c67f3c5038
commit 53af7208e6

View File

@ -645,6 +645,9 @@ gdk_content_formats_builder_clear (GdkContentFormatsBuilder *builder)
{
g_clear_pointer (&builder->gtypes, g_slist_free);
g_clear_pointer (&builder->mime_types, g_slist_free);
builder->n_gtypes = 0;
builder->n_mime_types = 0;
}
/**