Use glnx_unref_object instead of gs_unref_object

For non-GIO object types, at least until autocleanup support for GObject
based types becomes more widespread.
This commit is contained in:
Matthew Barnes committed 2015-05-06 22:07:04 -04:00
1 parent 4ee1acd981
commit 6a5f7b1288
48 files changed
+123 -123

No files matched your search

+2 -2
View File
@@ -294,8 +294,8 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
g_autoptr(GFile) efi_new_config_temp = NULL;
g_autoptr(GFile) efi_orig_config = NULL;
g_autoptr(GFile) new_config_path = NULL;
gs_unref_object GSSubprocessContext *procctx = NULL;
gs_unref_object GSSubprocess *proc = NULL;
glnx_unref_object GSSubprocessContext *procctx = NULL;
glnx_unref_object GSSubprocess *proc = NULL;
gs_strfreev char **child_env = g_get_environ ();
g_autofree char *bootversion_str = g_strdup_printf ("%u", (guint)bootversion);
g_autoptr(GFile) config_path_efi_dir = NULL;
+1 -1
View File
@@ -139,7 +139,7 @@ ostree_deployment_set_origin (OstreeDeployment *self, GKeyFile *origin)
OstreeDeployment *
ostree_deployment_clone (OstreeDeployment *self)
{
gs_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
glnx_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
GKeyFile *new_origin = NULL;
OstreeDeployment *ret = ostree_deployment_new (self->index, self->osname, self->csum,
self->deployserial,
+1 -1
View File
@@ -446,7 +446,7 @@ on_request_sent (GObject *object,
{
OstreeFetcherPendingURI *pending = user_data;
GError *local_error = NULL;
gs_unref_object SoupMessage *msg = NULL;
glnx_unref_object SoupMessage *msg = NULL;
pending->state = OSTREE_FETCHER_STATE_COMPLETE;
pending->request_body = soup_request_send_finish ((SoupRequest*) object,
+3 -3
View File
@@ -184,7 +184,7 @@ ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeMutableTree *ret_dir = NULL;
glnx_unref_object OstreeMutableTree *ret_dir = NULL;
g_return_val_if_fail (name != NULL, FALSE);
@@ -217,7 +217,7 @@ ostree_mutable_tree_lookup (OstreeMutableTree *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeMutableTree *ret_subdir = NULL;
glnx_unref_object OstreeMutableTree *ret_subdir = NULL;
g_autofree char *ret_file_checksum = NULL;
ret_subdir = ot_gobject_refz (g_hash_table_lookup (self->subdirs, name));
@@ -259,7 +259,7 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self,
gboolean ret = FALSE;
int i;
OstreeMutableTree *subdir = self; /* nofree */
gs_unref_object OstreeMutableTree *ret_parent = NULL;
glnx_unref_object OstreeMutableTree *ret_parent = NULL;
g_assert (metadata_checksum != NULL);
+2 -2
View File
@@ -539,7 +539,7 @@ write_object (OstreeRepo *self,
g_autofree char *temp_filename = NULL;
g_autoptr(GFile) stored_path = NULL;
g_autofree guchar *ret_csum = NULL;
gs_unref_object OstreeChecksumInputStream *checksum_input = NULL;
glnx_unref_object OstreeChecksumInputStream *checksum_input = NULL;
g_autoptr(GInputStream) file_input = NULL;
g_autoptr(GFileInfo) file_info = NULL;
gs_unref_variant GVariant *xattrs = NULL;
@@ -2278,7 +2278,7 @@ write_directory_content_to_mtree_internal (OstreeRepo *self,
gboolean ret = FALSE;
g_autoptr(GFile) child = NULL;
g_autoptr(GFileInfo) modified_info = NULL;
gs_unref_object OstreeMutableTree *child_mtree = NULL;
glnx_unref_object OstreeMutableTree *child_mtree = NULL;
g_autofree char *child_relpath = NULL;
const char *name;
GFileType file_type;
+4 -4
View File
@@ -125,11 +125,11 @@ write_libarchive_entry_to_mtree (OstreeRepo *self,
g_autoptr(GFileInfo) file_info = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
gs_unref_ptrarray GPtrArray *hardlink_split_path = NULL;
gs_unref_object OstreeMutableTree *subdir = NULL;
gs_unref_object OstreeMutableTree *parent = NULL;
gs_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *parent = NULL;
glnx_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
g_autofree char *hardlink_source_checksum = NULL;
gs_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
glnx_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
g_autofree guchar *tmp_csum = NULL;
g_autofree char *tmp_checksum = NULL;
+2 -2
View File
@@ -964,7 +964,7 @@ scan_commit_object (OtPullData *pull_data,
if (pull_data->gpg_verify)
{
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
result = ostree_repo_verify_commit_ext (pull_data->repo,
checksum,
@@ -1640,7 +1640,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
g_autofree char *remote_mode_str = NULL;
gs_unref_object OstreeMetalink *metalink = NULL;
glnx_unref_object OstreeMetalink *metalink = NULL;
OtPullData pull_data_real = { 0, };
OtPullData *pull_data = &pull_data_real;
GKeyFile *remote_config = NULL;
+3 -3
View File
@@ -3253,7 +3253,7 @@ ostree_repo_sign_commit (OstreeRepo *self,
gs_unref_variant GVariant *commit_variant = NULL;
gs_unref_variant GVariant *old_metadata = NULL;
gs_unref_variant GVariant *new_metadata = NULL;
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GError *local_error = NULL;
if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT,
@@ -3409,7 +3409,7 @@ _ostree_repo_gpg_verify_with_metadata (OstreeRepo *self,
GError **error)
{
OstreeGpgVerifyResult *result = NULL;
gs_unref_object OstreeGpgVerifier *verifier = NULL;
glnx_unref_object OstreeGpgVerifier *verifier = NULL;
gs_unref_variant GVariant *signaturedata = NULL;
GByteArray *buffer;
GVariantIter iter;
@@ -3489,7 +3489,7 @@ ostree_repo_verify_commit (OstreeRepo *self,
GCancellable *cancellable,
GError **error)
{
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
gboolean ret = FALSE;
result = ostree_repo_verify_commit_ext (self, commit_checksum,
+2 -2
View File
@@ -62,7 +62,7 @@ _ostree_sysroot_list_deployment_dirs_for_os (GFile *osdir,
const char *name;
GFileInfo *file_info = NULL;
GFile *child = NULL;
gs_unref_object OstreeDeployment *deployment = NULL;
glnx_unref_object OstreeDeployment *deployment = NULL;
g_autofree char *csum = NULL;
gint deployserial;
@@ -503,7 +503,7 @@ ostree_sysroot_cleanup (OstreeSysroot *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_return_val_if_fail (self->loaded, FALSE);
+9 -9
View File
@@ -740,7 +740,7 @@ merge_configuration (OstreeSysroot *sysroot,
g_autoptr(GFile) source_etc_pristine_path = NULL;
g_autoptr(GFile) deployment_usretc_path = NULL;
g_autoptr(GFile) deployment_etc_path = NULL;
gs_unref_object OstreeSePolicy *sepolicy = NULL;
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gboolean etc_exists;
gboolean usretc_exists;
@@ -1582,9 +1582,9 @@ ostree_sysroot_write_deployments (OstreeSysroot *self,
else
{
int new_bootversion = self->bootversion ? 0 : 1;
gs_unref_object OstreeBootloader *bootloader = NULL;
glnx_unref_object OstreeBootloader *bootloader = NULL;
g_autoptr(GFile) new_loader_entries_dir = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean show_osname = FALSE;
if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error))
@@ -1765,18 +1765,18 @@ ostree_sysroot_deploy_tree (OstreeSysroot *self,
{
gboolean ret = FALSE;
gint new_deployserial;
gs_unref_object OstreeDeployment *new_deployment = NULL;
gs_unref_object OstreeDeployment *merge_deployment = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_autoptr(GFile) osdeploydir = NULL;
g_autoptr(GFile) deployment_var = NULL;
g_autoptr(GFile) commit_root = NULL;
g_autoptr(GFile) tree_kernel_path = NULL;
g_autoptr(GFile) tree_initramfs_path = NULL;
glnx_fd_close int deployment_dfd = -1;
gs_unref_object OstreeSePolicy *sepolicy = NULL;
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
g_autofree char *new_bootcsum = NULL;
gs_unref_object OstreeBootconfigParser *bootconfig = NULL;
glnx_unref_object OstreeBootconfigParser *bootconfig = NULL;
g_return_val_if_fail (osname != NULL || self->booted_deployment != NULL, FALSE);
@@ -1923,7 +1923,7 @@ ostree_sysroot_deployment_set_kargs (OstreeSysroot *self,
gboolean ret = FALSE;
guint i;
gs_unref_ptrarray GPtrArray *new_deployments = g_ptr_array_new_with_free_func (g_object_unref);
gs_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
g_autofree char *new_options = NULL;
OstreeBootconfigParser *new_bootconfig;
+2 -2
View File
@@ -493,7 +493,7 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
char *refs_to_fetch[] = { self->origin_ref, NULL };
const char *from_revision = NULL;
g_autofree char *new_revision = NULL;
@@ -564,7 +564,7 @@ ostree_sysroot_upgrader_deploy (OstreeSysrootUpgrader *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
if (!ostree_sysroot_deploy_tree (self->sysroot, self->osname,
self->new_revision,
+6 -6
View File
@@ -256,7 +256,7 @@ ostree_sysroot_ensure_initialized (OstreeSysroot *self,
dir = ot_gfile_get_child_build_path (ostree_dir, "repo", "objects", NULL);
if (!g_file_query_exists (dir, NULL))
{
gs_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
glnx_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
if (!ostree_repo_create (repo, OSTREE_REPO_MODE_BARE,
cancellable, error))
goto out;
@@ -416,7 +416,7 @@ _ostree_sysroot_read_boot_loader_configs (OstreeSysroot *self,
g_str_has_suffix (dent->d_name, ".conf") &&
S_ISREG (stbuf.st_mode))
{
gs_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
glnx_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
if (!ostree_bootconfig_parser_parse_at (config, dfd_iter.fd, dent->d_name, cancellable, error))
{
@@ -584,7 +584,7 @@ parse_deployment (OstreeSysroot *self,
{
gboolean ret = FALSE;
const char *relative_boot_link;
gs_unref_object OstreeDeployment *ret_deployment = NULL;
glnx_unref_object OstreeDeployment *ret_deployment = NULL;
int entry_boot_version;
int treebootserial = -1;
int deployserial = -1;
@@ -676,7 +676,7 @@ list_deployments_process_one_boot_entry (OstreeSysroot *self,
{
gboolean ret = FALSE;
g_autofree char *ostree_arg = NULL;
gs_unref_object OstreeDeployment *deployment = NULL;
glnx_unref_object OstreeDeployment *deployment = NULL;
ostree_arg = get_ostree_kernel_arg_from_config (config);
if (ostree_arg == NULL)
@@ -935,7 +935,7 @@ _ostree_sysroot_query_bootloader (OstreeSysroot *sysroot,
{
gboolean ret = FALSE;
gboolean is_active;
gs_unref_object OstreeBootloader *ret_loader = NULL;
glnx_unref_object OstreeBootloader *ret_loader = NULL;
ret_loader = (OstreeBootloader*)_ostree_bootloader_syslinux_new (sysroot);
if (!_ostree_bootloader_query (ret_loader, &is_active,
@@ -1021,7 +1021,7 @@ find_booted_deployment (OstreeSysroot *self,
gboolean ret = FALSE;
struct stat root_stbuf;
struct stat self_stbuf;
gs_unref_object OstreeDeployment *ret_deployment = NULL;
glnx_unref_object OstreeDeployment *ret_deployment = NULL;
if (stat ("/", &root_stbuf) != 0)
{