mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-04 22:17:15 -04:00
Fix GVariant leak
ostree_async_progress_get_variant returns a ref, so free it. Closes: #1964 Approved by: mwleeds
This commit is contained in:
committed by
Atomic Bot
parent
7df3f9f1ba
commit
ebb3ff532d
@@ -3437,9 +3437,11 @@ default_progress_changed (OstreeAsyncProgress *progress,
|
||||
}
|
||||
else
|
||||
{
|
||||
g_autoptr(GVariant) outstanding_fetches = NULL;
|
||||
/* We get some extra calls before we've really started due to the initialization of the
|
||||
extra data, so ignore those */
|
||||
if (ostree_async_progress_get_variant (progress, "outstanding-fetches") == NULL)
|
||||
outstanding_fetches = ostree_async_progress_get_variant (progress, "outstanding-fetches");
|
||||
if (outstanding_fetches == NULL)
|
||||
return;
|
||||
|
||||
ostree_repo_pull_default_console_progress_changed (progress, user_data);
|
||||
|
||||
@@ -5429,10 +5429,12 @@ progress_cb (OstreeAsyncProgress *progress, gpointer user_data)
|
||||
guint requested;
|
||||
guint64 total_transferred;
|
||||
g_autofree gchar *formatted_bytes_total_transferred = NULL;
|
||||
g_autoptr(GVariant) outstanding_fetchesv = NULL;
|
||||
|
||||
/* We get some extra calls before we've really started due to the initialization of the
|
||||
extra data, so ignore those */
|
||||
if (ostree_async_progress_get_variant (progress, "outstanding-fetches") == NULL)
|
||||
outstanding_fetchesv = ostree_async_progress_get_variant (progress, "outstanding-fetches");
|
||||
if (outstanding_fetchesv == NULL)
|
||||
return;
|
||||
|
||||
buf = g_string_new ("");
|
||||
|
||||
Reference in New Issue
Block a user