diff options
author | Luca BRUNO <luca.bruno@coreos.com> | 2021-08-18 09:06:26 +0000 |
---|---|---|
committer | Luca BRUNO <luca.bruno@coreos.com> | 2021-08-18 09:06:26 +0000 |
commit | b079c11381aa2b297652753d346b12b8112ef542 (patch) | |
tree | 49790f375fafc36a663070a070329cba93a55179 /src/ostree | |
parent | 87db562744cc47610ca2d7212259ded5b0f5fb0d (diff) | |
download | ostree-b079c11381aa2b297652753d346b12b8112ef542.tar.gz |
builtins/commit: move commit modifier to auto-cleanup
This reduces the usage of goto cleanup logic by porting the commit
modifier pointer to autoptr.
Diffstat (limited to 'src/ostree')
-rw-r--r-- | src/ostree/ot-builtin-commit.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c index 7a23741e..2663bd1c 100644 --- a/src/ostree/ot-builtin-commit.c +++ b/src/ostree/ot-builtin-commit.c @@ -432,7 +432,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio g_autoptr(GHashTable) skip_list = NULL; OstreeRepoCommitModifierFlags flags = 0; g_autoptr(OstreeSePolicy) policy = NULL; - OstreeRepoCommitModifier *modifier = NULL; + g_autoptr(OstreeRepoCommitModifier) modifier = NULL; OstreeRepoTransactionStats stats; struct CommitFilterData filter_data = { 0, }; g_autofree char *commit_body = NULL; @@ -968,7 +968,5 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio out: if (repo) ostree_repo_abort_transaction (repo, cancellable, NULL); - if (modifier) - ostree_repo_commit_modifier_unref (modifier); return ret; } |