mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-01 11:31:21 -05:00
populate_commit_data_cache: Don't leak child value
g_variant_get_child_value() returns a non-floating reference, so g_variant_builder_add() will not sink it. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -3301,7 +3301,8 @@ populate_commit_data_cache (OstreeRepo *repo,
|
||||
{
|
||||
VarVariantRef v = var_metadata_entry_get_value (m);
|
||||
GVariant *vv = var_variant_dup_to_gvariant (v);
|
||||
g_variant_builder_add (&sparse_builder, "{sv}", m_key, g_variant_get_child_value (vv, 0));
|
||||
g_autoptr(GVariant) child = g_variant_get_child_value (vv, 0);
|
||||
g_variant_builder_add (&sparse_builder, "{sv}", m_key, child);
|
||||
has_sparse = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user