From c0b6cf92985ce761d2279c0fe86caef8625a089b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 21 Nov 2022 16:35:02 +0000 Subject: [PATCH] ot-builtin-pull: Fix a minor leak with progress reporting `ostree_async_progress_get_status()` returns an allocated string. Signed-off-by: Philip Withnall --- src/ostree/ot-builtin-pull-local.c | 2 +- src/ostree/ot-builtin-pull.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c index c39930af..5dfaf887 100644 --- a/src/ostree/ot-builtin-pull-local.c +++ b/src/ostree/ot-builtin-pull-local.c @@ -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); } diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c index 61f408eb..e6cc053b 100644 --- a/src/ostree/ot-builtin-pull.c +++ b/src/ostree/ot-builtin-pull.c @@ -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); }