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:
1 parent
49d54d6ca8
commit
c0b6cf9298
2 files changed
+2
-2
No files matched your search
@@ -211,7 +211,7 @@ ostree_builtin_pull_local (int argc, char **argv, OstreeCommandInvocation *invoc
|
|||||||
if (!console.is_tty)
|
if (!console.is_tty)
|
||||||
{
|
{
|
||||||
g_assert (progress);
|
g_assert (progress);
|
||||||
const char *status = ostree_async_progress_get_status (progress);
|
g_autofree char *status = ostree_async_progress_get_status (progress);
|
||||||
if (status)
|
if (status)
|
||||||
g_print ("%s\n", status);
|
g_print ("%s\n", status);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ ostree_builtin_pull (int argc, char **argv, OstreeCommandInvocation *invocation,
|
|||||||
if (!console.is_tty && !opt_dry_run)
|
if (!console.is_tty && !opt_dry_run)
|
||||||
{
|
{
|
||||||
g_assert (progress);
|
g_assert (progress);
|
||||||
const char *status = ostree_async_progress_get_status (progress);
|
g_autofree char *status = ostree_async_progress_get_status (progress);
|
||||||
if (status)
|
if (status)
|
||||||
g_print ("%s\n", status);
|
g_print ("%s\n", status);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user