Merge pull request #2778 from pwithnall/small-leaks

Fix a couple of small leaks
This commit is contained in:
Colin Walters 2022-11-21 12:39:52 -05:00 committed by GitHub
commit 9d652be3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -4712,6 +4712,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
!load_remote_repo_config (pull_data, &remote_config, cancellable, error))
goto out;
g_clear_pointer (&remote_mode_str, g_free);
if (!ot_keyfile_get_value_with_default (remote_config, "core", "mode", "bare",
&remote_mode_str, error))
goto out;

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);
}

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);
}