ot-builtin-pull: Fix a minor leak with progress reporting

`ostree_async_progress_get_status()` returns an allocated string.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall committed 2022-11-21 16:35:02 +00:00
1 parent 49d54d6ca8
commit c0b6cf9298
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -211,7 +211,7 @@ ostree_builtin_pull_local (int argc, char **argv, OstreeCommandInvocation *invoc
if (!console.is_tty)
{
g_assert (progress);
const char *status = ostree_async_progress_get_status (progress);
g_autofree char *status = ostree_async_progress_get_status (progress);
if (status)
g_print ("%s\n", status);
}
+1 -1
View File
@@ -389,7 +389,7 @@ ostree_builtin_pull (int argc, char **argv, OstreeCommandInvocation *invocation,
if (!console.is_tty && !opt_dry_run)
{
g_assert (progress);
const char *status = ostree_async_progress_get_status (progress);
g_autofree char *status = ostree_async_progress_get_status (progress);
if (status)
g_print ("%s\n", status);
}