gvariant: Fix a leak of a GVariantTypeInfo on an error handling path

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-10-25 18:03:56 +01:00
parent c2dc74e2ec
commit f98c60e4ee

View File

@ -1183,6 +1183,7 @@ g_variant_get_child_value (GVariant *value,
G_VARIANT_MAX_RECURSION_DEPTH - value->depth) G_VARIANT_MAX_RECURSION_DEPTH - value->depth)
{ {
g_assert (g_variant_is_of_type (value, G_VARIANT_TYPE_VARIANT)); g_assert (g_variant_is_of_type (value, G_VARIANT_TYPE_VARIANT));
g_variant_type_info_unref (s_child.type_info);
return g_variant_new_tuple (NULL, 0); return g_variant_new_tuple (NULL, 0);
} }