mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
builtins/commit: move commit modifier to auto-cleanup
This reduces the usage of goto cleanup logic by porting the commit modifier pointer to autoptr.
This commit is contained in:
parent
87db562744
commit
b079c11381
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user