cmd: Use autoptr for GKeyFile
Prep for code style conversion. Closes: #891 Approved by: jlebon
This commit is contained in:
parent
88a1fc92a9
commit
9a3555a74b
|
|
@ -56,7 +56,7 @@ ot_admin_builtin_deploy (int argc, char **argv, GCancellable *cancellable, GErro
|
||||||
const char *refspec;
|
const char *refspec;
|
||||||
g_autoptr(GOptionContext) context = NULL;
|
g_autoptr(GOptionContext) context = NULL;
|
||||||
glnx_unref_object OstreeSysroot *sysroot = NULL;
|
glnx_unref_object OstreeSysroot *sysroot = NULL;
|
||||||
GKeyFile *origin = NULL;
|
g_autoptr(GKeyFile) origin = NULL;
|
||||||
glnx_unref_object OstreeRepo *repo = NULL;
|
glnx_unref_object OstreeRepo *repo = NULL;
|
||||||
glnx_unref_object OstreeDeployment *new_deployment = NULL;
|
glnx_unref_object OstreeDeployment *new_deployment = NULL;
|
||||||
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
|
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
|
||||||
|
|
@ -171,7 +171,5 @@ ot_admin_builtin_deploy (int argc, char **argv, GCancellable *cancellable, GErro
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
if (origin)
|
|
||||||
g_key_file_unref (origin);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
|
||||||
glnx_unref_object OstreeAsyncProgress *progress = NULL;
|
glnx_unref_object OstreeAsyncProgress *progress = NULL;
|
||||||
gboolean changed;
|
gboolean changed;
|
||||||
GKeyFile *old_origin;
|
GKeyFile *old_origin;
|
||||||
GKeyFile *new_origin = NULL;
|
g_autoptr(GKeyFile) new_origin = NULL;
|
||||||
|
|
||||||
context = g_option_context_new ("REF - Construct new tree from REF and deploy it");
|
context = g_option_context_new ("REF - Construct new tree from REF and deploy it");
|
||||||
|
|
||||||
|
|
@ -166,7 +166,5 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
if (new_origin)
|
|
||||||
g_key_file_unref (new_origin);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue