ostree_repo_find_remotes_async: Fix leak of summary

We were creating a GVariant from a GBytes and storing it in an
g_autoptr without ref_sinking it.
This commit is contained in:
Alexander Larsson 2020-09-14 13:52:10 +02:00
parent 06a77bfd69
commit 6ed1066ef0
1 changed files with 2 additions and 2 deletions

View File

@ -5372,8 +5372,8 @@ find_remotes_cb (GObject *obj,
/* Check the metadata in the summary file, especially whether it contains
* all the @refs we are interested in. */
summary_v = g_variant_new_from_bytes (OSTREE_SUMMARY_GVARIANT_FORMAT,
summary_bytes, FALSE);
summary_v = g_variant_ref_sink (g_variant_new_from_bytes (OSTREE_SUMMARY_GVARIANT_FORMAT,
summary_bytes, FALSE));
/* Check the summarys additional metadata and set up @commit_metadata
* and @refs_and_remotes_table with the refs listed in the summary file,