diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2022-11-21 16:35:02 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2022-11-21 16:35:02 +0000 |
commit | c0b6cf92985ce761d2279c0fe86caef8625a089b (patch) | |
tree | ecabc3cbfa1f01d4080a090eec5b50fc2d24dd02 | |
parent | 49d54d6ca8f347a852ef8fd48e5c0bbf91cfe8fb (diff) | |
download | ostree-c0b6cf92985ce761d2279c0fe86caef8625a089b.tar.gz |
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>
-rw-r--r-- | src/ostree/ot-builtin-pull-local.c | 2 | ||||
-rw-r--r-- | 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); } |