diff options
46 files changed, 90 insertions, 90 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 752e63c4ac..45e7c0042f 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -423,7 +423,7 @@ _metagen_con_show_row_data_init_primary_active (MetagenConShowRowData *row_data) g_object_unref (row_data->primary_active); row_data->primary_active = g_object_ref (best_ac); } - g_clear_pointer (&row_data->all_active, g_ptr_array_unref); + nm_clear_pointer (&row_data->all_active, g_ptr_array_unref); } static void @@ -436,7 +436,7 @@ _metagen_con_show_row_data_destroy (gpointer data) g_clear_object (&row_data->connection); g_clear_object (&row_data->primary_active); - g_clear_pointer (&row_data->all_active, g_ptr_array_unref); + nm_clear_pointer (&row_data->all_active, g_ptr_array_unref); g_slice_free (MetagenConShowRowData, row_data); } @@ -9246,7 +9246,7 @@ nmcli_con_tab_completion (const char *text, int start, int end) if (generator_func) match_array = rl_completion_matches (text, generator_func); - g_clear_pointer (&nmc_tab_completion.words, g_strfreev); + nm_clear_pointer (&nmc_tab_completion.words, g_strfreev); return match_array; } diff --git a/clients/nm-online.c b/clients/nm-online.c index 9ea57641cb..5950da568c 100644 --- a/clients/nm-online.c +++ b/clients/nm-online.c @@ -303,7 +303,7 @@ main (int argc, char *argv[]) nm_clear_g_signal_handler (data.client, &data.client_notify_id); g_clear_object (&data.client); - g_clear_pointer (&data.loop, g_main_loop_unref); + nm_clear_pointer (&data.loop, g_main_loop_unref); if (!data.quiet) _print_progress (data.wait_startup, -1, NM_MAX (0, data.end_timestamp_ms - _now_ms ()), data.retval); diff --git a/clients/tui/nmt-password-dialog.c b/clients/tui/nmt-password-dialog.c index 009ab7ce4c..979a5c6871 100644 --- a/clients/tui/nmt-password-dialog.c +++ b/clients/tui/nmt-password-dialog.c @@ -175,8 +175,8 @@ nmt_password_dialog_finalize (GObject *object) g_free (priv->request_id); g_free (priv->prompt); - g_clear_pointer (&priv->entries, g_ptr_array_unref); - g_clear_pointer (&priv->secrets, g_ptr_array_unref); + nm_clear_pointer (&priv->entries, g_ptr_array_unref); + nm_clear_pointer (&priv->secrets, g_ptr_array_unref); G_OBJECT_CLASS (nmt_password_dialog_parent_class)->finalize (object); } diff --git a/clients/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c index e0f6df4e4f..88d64fa3e3 100644 --- a/clients/tui/nmt-route-entry.c +++ b/clients/tui/nmt-route-entry.c @@ -148,7 +148,7 @@ nmt_route_entry_finalize (GObject *object) { NmtRouteEntryPrivate *priv = NMT_ROUTE_ENTRY_GET_PRIVATE (object); - g_clear_pointer (&priv->route, nm_ip_route_unref); + nm_clear_pointer (&priv->route, nm_ip_route_unref); G_OBJECT_CLASS (nmt_route_entry_parent_class)->finalize (object); } diff --git a/dispatcher/nm-dispatcher.c b/dispatcher/nm-dispatcher.c index c38ea00f29..7cd9d5532d 100644 --- a/dispatcher/nm-dispatcher.c +++ b/dispatcher/nm-dispatcher.c @@ -1090,7 +1090,7 @@ done: nm_clear_g_source (&signal_id_term); nm_clear_g_source (&signal_id_int); nm_clear_g_source (&gl.quit_id); - g_clear_pointer (&gl.loop, g_main_loop_unref); + nm_clear_pointer (&gl.loop, g_main_loop_unref); g_clear_object (&gl.dbus_connection); if (!gl.debug) diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index 58c9f0df59..5f18b651cb 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -1914,7 +1914,7 @@ nm_connection_update_secrets (NMConnection *connection, error); g_signal_handlers_unblock_by_func (setting, (GCallback) setting_changed_cb, connection); - g_clear_pointer (&setting_dict, g_variant_unref); + nm_clear_pointer (&setting_dict, g_variant_unref); if (success_detail == NM_SETTING_UPDATE_SECRET_ERROR) { nm_assert (!error || *error); diff --git a/libnm-core/nm-setting-user.c b/libnm-core/nm-setting-user.c index 87a0dfedc1..1c60d55bd6 100644 --- a/libnm-core/nm-setting-user.c +++ b/libnm-core/nm-setting-user.c @@ -327,7 +327,7 @@ out: /* setting a value purges all invalid values that were set * via GObject property. */ changed = TRUE; - g_clear_pointer (&priv->data_invalid, g_hash_table_unref); + nm_clear_pointer (&priv->data_invalid, g_hash_table_unref); } if (changed) _notify (self, PROP_DATA); @@ -462,8 +462,8 @@ set_property (GObject *object, guint prop_id, data = g_value_get_boxed (value); if (!data || !g_hash_table_size (data)) { - g_clear_pointer (&priv->data, g_hash_table_unref); - g_clear_pointer (&priv->data_invalid, g_hash_table_unref); + nm_clear_pointer (&priv->data, g_hash_table_unref); + nm_clear_pointer (&priv->data_invalid, g_hash_table_unref); return; } @@ -488,7 +488,7 @@ set_property (GObject *object, guint prop_id, } if ( priv->data_invalid && !g_hash_table_size (priv->data_invalid)) - g_clear_pointer (&priv->data_invalid, g_hash_table_unref); + nm_clear_pointer (&priv->data_invalid, g_hash_table_unref); break; default: diff --git a/libnm-core/nm-setting-wifi-p2p.c b/libnm-core/nm-setting-wifi-p2p.c index df33f1d04b..065f6e327f 100644 --- a/libnm-core/nm-setting-wifi-p2p.c +++ b/libnm-core/nm-setting-wifi-p2p.c @@ -183,7 +183,7 @@ set_property (GObject *object, guint prop_id, priv->wps_method = g_value_get_uint (value); break; case PROP_WFD_IES: - g_clear_pointer (&priv->wfd_ies, g_bytes_unref); + nm_clear_pointer (&priv->wfd_ies, g_bytes_unref); priv->wfd_ies = g_value_dup_boxed (value); break; default: diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c index 4e75fdfdb7..7fbd89544c 100644 --- a/libnm-core/nm-vpn-plugin-info.c +++ b/libnm-core/nm-vpn-plugin-info.c @@ -1176,7 +1176,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) } } - g_clear_pointer (&priv->keyfile, g_key_file_unref); + nm_clear_pointer (&priv->keyfile, g_key_file_unref); return TRUE; } @@ -1261,7 +1261,7 @@ finalize (GObject *object) g_free (priv->filename); g_hash_table_unref (priv->keys); - g_clear_pointer (&priv->keyfile, g_key_file_unref); + nm_clear_pointer (&priv->keyfile, g_key_file_unref); G_OBJECT_CLASS (nm_vpn_plugin_info_parent_class)->finalize (object); } diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c index eba5b57156..e64f1b2b44 100644 --- a/libnm-core/tests/test-general.c +++ b/libnm-core/tests/test-general.c @@ -3500,7 +3500,7 @@ test_setting_compare_addresses (void) success = nm_setting_diff (s1, s2, NM_SETTING_COMPARE_FLAG_EXACT, FALSE, &result); g_assert (!success); - g_clear_pointer (&result, g_hash_table_unref); + nm_clear_pointer (&result, g_hash_table_unref); } static void @@ -3532,7 +3532,7 @@ test_setting_compare_routes (void) success = nm_setting_diff (s1, s2, NM_SETTING_COMPARE_FLAG_EXACT, FALSE, &result); g_assert (!success); - g_clear_pointer (&result, g_hash_table_unref); + nm_clear_pointer (&result, g_hash_table_unref); } static void diff --git a/libnm-core/tests/test-keyfile.c b/libnm-core/tests/test-keyfile.c index 9675de831e..47a2757161 100644 --- a/libnm-core/tests/test-keyfile.c +++ b/libnm-core/tests/test-keyfile.c @@ -99,7 +99,7 @@ test_encode_key (void) GKeyFile **_keyfile = (keyfile); \ \ g_clear_object (_con); \ - g_clear_pointer (_keyfile, g_key_file_unref); \ + nm_clear_pointer (_keyfile, g_key_file_unref); \ } G_STMT_END static void diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 5cbc49de9b..aa8974f68c 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -329,7 +329,7 @@ finalize (GObject *object) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object); - g_clear_pointer (&priv->lldp_neighbors, g_ptr_array_unref); + nm_clear_pointer (&priv->lldp_neighbors, g_ptr_array_unref); g_free (priv->interface); g_free (priv->ip_interface); diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index c56a9b5b9f..5de25b25ab 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -963,10 +963,10 @@ finalize (GObject *object) nm_vpn_plugin_old_set_connection (plugin, NULL); g_free (priv->dbus_service_name); - g_clear_pointer (&priv->banner, g_variant_unref); - g_clear_pointer (&priv->tundev, g_variant_unref); - g_clear_pointer (&priv->gateway, g_variant_unref); - g_clear_pointer (&priv->mtu, g_variant_unref); + nm_clear_pointer (&priv->banner, g_variant_unref); + nm_clear_pointer (&priv->tundev, g_variant_unref); + nm_clear_pointer (&priv->gateway, g_variant_unref); + nm_clear_pointer (&priv->mtu, g_variant_unref); G_OBJECT_CLASS (nm_vpn_plugin_old_parent_class)->finalize (object); } diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index a0df8402c5..c0b11db94c 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -1145,10 +1145,10 @@ finalize (GObject *object) nm_vpn_service_plugin_set_connection (plugin, NULL); g_free (priv->dbus_service_name); - g_clear_pointer (&priv->banner, g_variant_unref); - g_clear_pointer (&priv->tundev, g_variant_unref); - g_clear_pointer (&priv->gateway, g_variant_unref); - g_clear_pointer (&priv->mtu, g_variant_unref); + nm_clear_pointer (&priv->banner, g_variant_unref); + nm_clear_pointer (&priv->tundev, g_variant_unref); + nm_clear_pointer (&priv->gateway, g_variant_unref); + nm_clear_pointer (&priv->mtu, g_variant_unref); G_OBJECT_CLASS (nm_vpn_service_plugin_parent_class)->finalize (object); } diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c index afcc4962dd..3d63e1ce28 100644 --- a/libnm/tests/test-nm-client.c +++ b/libnm/tests/test-nm-client.c @@ -364,7 +364,7 @@ test_wifi_ap_added_removed (void) NULL, &error); g_assert_no_error (error); - g_clear_pointer (&ret, g_variant_unref); + nm_clear_pointer (&ret, g_variant_unref); g_signal_connect (wifi, "access-point-removed", @@ -590,7 +590,7 @@ test_client_nm_running (void) g_source_remove (quit_id); /* And kill it */ - g_clear_pointer (&sinfo, nmtstc_service_cleanup); + nm_clear_pointer (&sinfo, nmtstc_service_cleanup); g_assert (nm_client_get_nm_running (client1)); diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c index 9bceeb588d..97953b6d87 100644 --- a/libnm/tests/test-secret-agent.c +++ b/libnm/tests/test-secret-agent.c @@ -84,7 +84,7 @@ test_secret_agent_get_secrets (NMSecretAgentOld *agent, done: callback (agent, connection, secrets, error, callback_data); g_clear_error (&error); - g_clear_pointer (&secrets, g_variant_unref); + nm_clear_pointer (&secrets, g_variant_unref); g_free (secret); } diff --git a/src/devices/adsl/nm-atm-manager.c b/src/devices/adsl/nm-atm-manager.c index 487011ff38..46d74a07fe 100644 --- a/src/devices/adsl/nm-atm-manager.c +++ b/src/devices/adsl/nm-atm-manager.c @@ -248,7 +248,7 @@ dispose (GObject *object) for (iter = priv->devices; iter; iter = iter->next) g_object_weak_unref (G_OBJECT (iter->data), device_destroyed, self); - g_clear_pointer (&priv->devices, g_slist_free); + nm_clear_pointer (&priv->devices, g_slist_free); priv->udev_client = nm_udev_client_unref (priv->udev_client); diff --git a/src/devices/nm-device-factory.c b/src/devices/nm-device-factory.c index f2289705ae..a7db266906 100644 --- a/src/devices/nm-device-factory.c +++ b/src/devices/nm-device-factory.c @@ -173,8 +173,8 @@ static GHashTable *factories_by_setting = NULL; static void __attribute__((destructor)) _cleanup (void) { - g_clear_pointer (&factories_by_link, g_hash_table_unref); - g_clear_pointer (&factories_by_setting, g_hash_table_unref); + nm_clear_pointer (&factories_by_link, g_hash_table_unref); + nm_clear_pointer (&factories_by_setting, g_hash_table_unref); } NMDeviceFactory * diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 6da9d94909..3a63af5847 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -8509,7 +8509,7 @@ shared_ip_release (gpointer data) { g_hash_table_remove (shared_ips, data); if (!g_hash_table_size (shared_ips)) - g_clear_pointer (&shared_ips, g_hash_table_unref); + nm_clear_pointer (&shared_ips, g_hash_table_unref); } static NMIP4Config * @@ -10199,7 +10199,7 @@ addrconf6_start (NMDevice *self, NMSettingIP6ConfigPrivacy use_tempaddr) nm_assert (!applied_config_get_current (&priv->ac_ip6_config)); applied_config_clear (&priv->ac_ip6_config); - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting_ip6_config (connection)); @@ -10250,7 +10250,7 @@ addrconf6_cleanup (NMDevice *self) nm_clear_g_signal_handler (priv->ndisc, &priv->ndisc_timeout_id); applied_config_clear (&priv->ac_ip6_config); - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); g_clear_object (&priv->ndisc); } @@ -12365,7 +12365,7 @@ _rt6_temporary_not_available_set (NMDevice *self, if ( !temporary_not_available || !temporary_not_available->len) { /* nothing outstanding. Clear tracking the routes. */ - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); return success; } @@ -15166,7 +15166,7 @@ _cleanup_generic_post (NMDevice *self, CleanupType cleanup_type) priv->ipv6ll_has = FALSE; memset (&priv->ipv6ll_addr, 0, sizeof (priv->ipv6ll_addr)); - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); g_slist_free_full (priv->vpn_configs_4, g_object_unref); diff --git a/src/devices/nm-lldp-listener.c b/src/devices/nm-lldp-listener.c index 65399ba8b8..b9caed509d 100644 --- a/src/devices/nm-lldp-listener.c +++ b/src/devices/nm-lldp-listener.c @@ -349,7 +349,7 @@ lldp_neighbor_free (LldpNeighbor *neighbor) ; } } - g_clear_pointer (&neighbor->variant, g_variant_unref); + nm_clear_pointer (&neighbor->variant, g_variant_unref); g_slice_free (LldpNeighbor, neighbor); } } diff --git a/src/devices/ovs/nm-ovsdb.c b/src/devices/ovs/nm-ovsdb.c index 564336d809..4265de6474 100644 --- a/src/devices/ovs/nm-ovsdb.c +++ b/src/devices/ovs/nm-ovsdb.c @@ -1624,9 +1624,9 @@ dispose (GObject *object) priv->calls = NULL; } - g_clear_pointer (&priv->bridges, g_hash_table_destroy); - g_clear_pointer (&priv->ports, g_hash_table_destroy); - g_clear_pointer (&priv->interfaces, g_hash_table_destroy); + nm_clear_pointer (&priv->bridges, g_hash_table_destroy); + nm_clear_pointer (&priv->ports, g_hash_table_destroy); + nm_clear_pointer (&priv->interfaces, g_hash_table_destroy); G_OBJECT_CLASS (nm_ovsdb_parent_class)->dispose (object); } diff --git a/src/devices/tests/test-lldp.c b/src/devices/tests/test-lldp.c index bd71c9e3d6..8fc4ad67d6 100644 --- a/src/devices/tests/test-lldp.c +++ b/src/devices/tests/test-lldp.c @@ -501,7 +501,7 @@ test_recv (TestRecvFixture *fixture, gconstpointer user_data) data->check (loop, listener); nm_clear_g_source (&sd_id); - g_clear_pointer (&loop, g_main_loop_unref); + nm_clear_pointer (&loop, g_main_loop_unref); } static void diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 947aa4c840..f89ec86c9f 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -324,7 +324,7 @@ connect_context_clear (NMModemBroadband *self) ConnectContext *ctx = self->_priv.ctx; g_clear_error (&ctx->first_error); - g_clear_pointer (&ctx->ip_types, g_array_unref); + nm_clear_pointer (&ctx->ip_types, g_array_unref); nm_clear_g_cancellable (&ctx->cancellable); g_clear_object (&ctx->connection); g_clear_object (&ctx->connect_properties); diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c index 4352d68817..2fc44881a9 100644 --- a/src/devices/wwan/nm-modem-ofono.c +++ b/src/devices/wwan/nm-modem-ofono.c @@ -769,7 +769,7 @@ stage1_prepare_done (GObject *source, g_clear_object (&priv->context_proxy_cancellable); - g_clear_pointer (&priv->connect_properties, g_hash_table_destroy); + nm_clear_pointer (&priv->connect_properties, g_hash_table_destroy); if (error) { _LOGW ("connection failed: %s", error->message); diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c index 3f382c2f8c..90a64acac5 100644 --- a/src/dhcp/nm-dhcp-client.c +++ b/src/dhcp/nm-dhcp-client.c @@ -925,7 +925,7 @@ nm_dhcp_client_handle_event (gpointer unused, && !ip_config) { _LOGW ("client bound but IP config not received"); new_state = NM_DHCP_STATE_FAIL; - g_clear_pointer (&str_options, g_hash_table_unref); + nm_clear_pointer (&str_options, g_hash_table_unref); } nm_dhcp_client_set_state (self, new_state, ip_config, str_options); @@ -1102,9 +1102,9 @@ dispose (GObject *object) nm_clear_g_free (&priv->iface); nm_clear_g_free (&priv->hostname); nm_clear_g_free (&priv->uuid); - g_clear_pointer (&priv->client_id, g_bytes_unref); - g_clear_pointer (&priv->hwaddr, g_bytes_unref); - g_clear_pointer (&priv->bcast_hwaddr, g_bytes_unref); + nm_clear_pointer (&priv->client_id, g_bytes_unref); + nm_clear_pointer (&priv->hwaddr, g_bytes_unref); + nm_clear_pointer (&priv->bcast_hwaddr, g_bytes_unref); G_OBJECT_CLASS (nm_dhcp_client_parent_class)->dispose (object); diff --git a/src/dhcp/nm-dhcp-dhclient-utils.c b/src/dhcp/nm-dhcp-dhclient-utils.c index f31c493cdd..da28abad0d 100644 --- a/src/dhcp/nm-dhcp-dhclient-utils.c +++ b/src/dhcp/nm-dhcp-dhclient-utils.c @@ -385,7 +385,7 @@ nm_dhcp_dhclient_create_config (const char *interface, /* Otherwise capture and return the existing client id */ if (out_new_client_id) - g_clear_pointer (out_new_client_id, g_bytes_unref); + nm_clear_pointer (out_new_client_id, g_bytes_unref); NM_SET_OUT (out_new_client_id, read_client_id (p)); } diff --git a/src/dhcp/nm-dhcp-listener.c b/src/dhcp/nm-dhcp-listener.c index 9cd8f7d3cb..79dea898e8 100644 --- a/src/dhcp/nm-dhcp-listener.c +++ b/src/dhcp/nm-dhcp-listener.c @@ -292,7 +292,7 @@ dispose (GObject *object) nm_clear_g_signal_handler (priv->dbus_mgr, &priv->new_conn_id); nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id); - g_clear_pointer (&priv->connections, g_hash_table_destroy); + nm_clear_pointer (&priv->connections, g_hash_table_destroy); g_clear_object (&priv->dbus_mgr); diff --git a/src/dns/nm-dns-dnsmasq.c b/src/dns/nm-dns-dnsmasq.c index 1c430afdad..fdff3af16f 100644 --- a/src/dns/nm-dns-dnsmasq.c +++ b/src/dns/nm-dns-dnsmasq.c @@ -1161,7 +1161,7 @@ dispose (GObject *object) _main_cleanup (self, FALSE); - g_clear_pointer (&priv->set_server_ex_args, g_variant_unref); + nm_clear_pointer (&priv->set_server_ex_args, g_variant_unref); G_OBJECT_CLASS (nm_dns_dnsmasq_parent_class)->dispose (object); diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 63ac4b2bdc..69833e01c1 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -1368,7 +1368,7 @@ clear_domain_lists (NMDnsManager *self) head = _ip_config_lst_head (self); c_list_for_each_entry (ip_data, head, ip_config_lst) { nm_clear_g_free (&ip_data->domains.search); - g_clear_pointer (&ip_data->domains.reverse, g_strfreev); + nm_clear_pointer (&ip_data->domains.reverse, g_strfreev); } } @@ -1557,7 +1557,7 @@ plugin_skip: && result == SR_SUCCESS) g_signal_emit (self, signals[CONFIG_CHANGED], 0); - g_clear_pointer (&priv->config_variant, g_variant_unref); + nm_clear_pointer (&priv->config_variant, g_variant_unref); _notify (self, PROP_CONFIGURATION); if (result != SR_SUCCESS) { @@ -2313,7 +2313,7 @@ dispose (GObject *object) c_list_for_each_entry_safe (ip_data, ip_data_safe, &priv->ip_config_lst_head, ip_config_lst) _ip_config_data_free (ip_data); - g_clear_pointer (&priv->configs, g_hash_table_destroy); + nm_clear_pointer (&priv->configs, g_hash_table_destroy); nm_clear_g_source (&priv->plugin_ratelimit.timer); @@ -2321,7 +2321,7 @@ dispose (GObject *object) G_OBJECT_CLASS (nm_dns_manager_parent_class)->dispose (object); - g_clear_pointer (&priv->config_variant, g_variant_unref); + nm_clear_pointer (&priv->config_variant, g_variant_unref); } static void diff --git a/src/initrd/nmi-dt-reader.c b/src/initrd/nmi-dt-reader.c index 9bbbf87c95..f118adc39f 100644 --- a/src/initrd/nmi-dt-reader.c +++ b/src/initrd/nmi-dt-reader.c @@ -363,7 +363,7 @@ nmi_dt_reader_parse (const char *sysfs_dir) if (!nm_connection_normalize (connection, NULL, NULL, &error)) { _LOGW (LOGD_CORE, "Generated an invalid connection: %s", error->message); - g_clear_pointer (&connection, g_object_unref); + nm_clear_pointer (&connection, g_object_unref); } return g_steal_pointer (&connection); diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c index 8d3fab765a..3a37266751 100644 --- a/src/nm-checkpoint.c +++ b/src/nm-checkpoint.c @@ -723,8 +723,8 @@ dispose (GObject *object) nm_assert (c_list_is_empty (&self->checkpoints_lst)); - g_clear_pointer (&priv->devices, g_hash_table_unref); - g_clear_pointer (&priv->connection_uuids, g_hash_table_unref); + nm_clear_pointer (&priv->devices, g_hash_table_unref); + nm_clear_pointer (&priv->connection_uuids, g_hash_table_unref); nm_clear_pointer (&priv->removed_devices, g_ptr_array_unref); nm_clear_g_signal_handler (priv->manager, &priv->dev_removed_id); diff --git a/src/nm-config.c b/src/nm-config.c index 3bce8e556c..63347db7bb 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -274,7 +274,7 @@ nm_config_get_warnings (NMConfig *config) void nm_config_clear_warnings (NMConfig *config) { - g_clear_pointer (&NM_CONFIG_GET_PRIVATE (config)->warnings, g_strfreev); + nm_clear_pointer (&NM_CONFIG_GET_PRIVATE (config)->warnings, g_strfreev); } NMConfigData * diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c index 3e0c8ada3d..239e06e11a 100644 --- a/src/nm-dbus-manager.c +++ b/src/nm-dbus-manager.c @@ -1631,7 +1631,7 @@ dispose (GObject *object) nm_assert (!priv->objects_by_path || g_hash_table_size (priv->objects_by_path) == 0); nm_assert (c_list_is_empty (&priv->objects_lst_head)); - g_clear_pointer (&priv->objects_by_path, g_hash_table_destroy); + nm_clear_pointer (&priv->objects_by_path, g_hash_table_destroy); c_list_for_each_entry_safe (s, s_safe, &priv->private_servers_lst_head, private_servers_lst) private_server_free (s); diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c index 7ddd65e219..fdc0d4a4ac 100644 --- a/src/nm-iface-helper.c +++ b/src/nm-iface-helper.c @@ -596,7 +596,7 @@ main (int argc, char *argv[]) _LOGI (LOGD_CORE, "exiting"); nm_clear_g_source (&sd_id); - g_clear_pointer (&gl.main_loop, g_main_loop_unref); + nm_clear_pointer (&gl.main_loop, g_main_loop_unref); return 0; } diff --git a/src/nm-manager.c b/src/nm-manager.c index ee1feb941b..1f3ba1f661 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -7731,7 +7731,7 @@ dispose (GObject *object) nm_clear_g_source (&priv->devices_inited_id); - g_clear_pointer (&priv->checkpoint_mgr, nm_checkpoint_manager_free); + nm_clear_pointer (&priv->checkpoint_mgr, nm_checkpoint_manager_free); if (priv->concheck_mgr) { g_signal_handlers_disconnect_by_func (priv->concheck_mgr, @@ -7786,7 +7786,7 @@ dispose (GObject *object) g_clear_object (&priv->vpn_manager); sleep_devices_clear (self); - g_clear_pointer (&priv->sleep_devices, g_hash_table_unref); + nm_clear_pointer (&priv->sleep_devices, g_hash_table_unref); if (priv->sleep_monitor) { g_signal_handlers_disconnect_by_func (priv->sleep_monitor, sleeping_cb, self); @@ -7816,7 +7816,7 @@ dispose (GObject *object) nm_clear_g_source (&priv->timestamp_update_id); - g_clear_pointer (&priv->device_route_metrics, g_hash_table_destroy); + nm_clear_pointer (&priv->device_route_metrics, g_hash_table_destroy); G_OBJECT_CLASS (nm_manager_parent_class)->dispose (object); } diff --git a/src/nm-policy.c b/src/nm-policy.c index 1f1d2835d8..2a9f6c051f 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -2668,7 +2668,7 @@ dispose (GObject *object) nm_clear_g_object (&priv->default_ac6); nm_clear_g_object (&priv->activating_ac4); nm_clear_g_object (&priv->activating_ac6); - g_clear_pointer (&priv->pending_active_connections, g_hash_table_unref); + nm_clear_pointer (&priv->pending_active_connections, g_hash_table_unref); c_list_for_each_entry_safe (data, data_safe, &priv->pending_activation_checks, pending_lst) activate_data_free (data); diff --git a/src/nm-session-monitor.c b/src/nm-session-monitor.c index d189eb5a0d..6fdc57ebc5 100644 --- a/src/nm-session-monitor.c +++ b/src/nm-session-monitor.c @@ -185,8 +185,8 @@ out: if (error) _LOGE ("failed to load ConsoleKit database: %s", error->message); g_clear_error (&error); - g_clear_pointer (&groups, g_strfreev); - g_clear_pointer (&keyfile, g_key_file_free); + nm_clear_pointer (&groups, g_strfreev); + nm_clear_pointer (&keyfile, g_key_file_free); return finished; } @@ -271,7 +271,7 @@ ck_init (NMSessionMonitor *monitor) static void ck_finalize (NMSessionMonitor *monitor) { - g_clear_pointer (&monitor->ck.cache, g_hash_table_unref); + nm_clear_pointer (&monitor->ck.cache, g_hash_table_unref); g_clear_object (&monitor->ck.monitor); } #endif /* SESSION_TRACKING_CONSOLEKIT */ diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c index 5eeeea2cbe..4a81dc4976 100644 --- a/src/platform/nm-fake-platform.c +++ b/src/platform/nm-fake-platform.c @@ -1346,7 +1346,7 @@ finalize (GObject *object) NMFakePlatformLink *device = &g_array_index (priv->links, NMFakePlatformLink, i); g_free (device->udi); - g_clear_pointer (&device->obj, nmp_object_unref); + nm_clear_pointer (&device->obj, nmp_object_unref); } g_array_unref (priv->links); diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index c744be88d4..f7249bb71e 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -8351,7 +8351,7 @@ ip_route_get (NMPlatform *platform, .r.rtm_flags = 0x1000 /* RTM_F_LOOKUP_TABLE */, }; - g_clear_pointer (&route, nmp_object_unref); + nm_clear_pointer (&route, nmp_object_unref); if (!_nl_addattr_l (&req.n, sizeof (req), RTA_DST, address, addr_len)) nm_assert_not_reached (); @@ -8554,7 +8554,7 @@ event_handler_recvmsgs (NMPlatform *platform, gboolean handle_events) nm_auto_free unsigned char *buf = NULL; continue_reading: - g_clear_pointer (&buf, free); + nm_clear_pointer (&buf, free); n = nl_recv (sk, &nla, &buf, &creds, &creds_has); if (n <= 0) { diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index f16f567c16..699c8902fa 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -4761,7 +4761,7 @@ _ip4_dev_route_blacklist_schedule (NMPlatform *self) if ( !priv->ip4_dev_route_blacklist_hash || g_hash_table_size (priv->ip4_dev_route_blacklist_hash) == 0) { - g_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); nm_clear_g_source (&priv->ip4_dev_route_blacklist_gc_timeout_id); } else { if (!priv->ip4_dev_route_blacklist_gc_timeout_id) { @@ -7943,7 +7943,7 @@ finalize (GObject *object) nm_clear_g_source (&priv->ip4_dev_route_blacklist_check_id); nm_clear_g_source (&priv->ip4_dev_route_blacklist_gc_timeout_id); - g_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); g_clear_object (&self->_netns); nm_dedup_multi_index_unref (priv->multi_idx); nmp_cache_free (priv->cache); diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index 723b6fcf5b..f393ae933e 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -190,7 +190,7 @@ _accept_or_wait_signal (const char *file, int line, const char *func, SignalData if (data->received_count == 0) { data->loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (data->loop); - g_clear_pointer (&data->loop, g_main_loop_unref); + nm_clear_pointer (&data->loop, g_main_loop_unref); } _accept_signal (file, line, func, data); @@ -205,7 +205,7 @@ _wait_signal (const char *file, int line, const char *func, SignalData *data) data->loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (data->loop); - g_clear_pointer (&data->loop, g_main_loop_unref); + nm_clear_pointer (&data->loop, g_main_loop_unref); _accept_signal (file, line, func, data); } @@ -590,7 +590,7 @@ nmtstp_wait_for_signal (NMPlatform *platform, gint64 timeout_msec) g_assert (nm_clear_g_signal_handler (platform, &id_ip4_route)); g_assert (nm_clear_g_signal_handler (platform, &id_ip6_route)); - g_clear_pointer (&data.loop, g_main_loop_unref); + nm_clear_pointer (&data.loop, g_main_loop_unref); /* return the number of signals, or 0 if timeout was reached .*/ return data.signal_counts; diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index 95d71b0971..48e3dce253 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -2611,14 +2611,14 @@ dispose (GObject *object) nm_clear_pointer (&priv->system_secrets, g_variant_unref); nm_clear_pointer (&priv->agent_secrets, g_variant_unref); - g_clear_pointer (&priv->seen_bssids, g_hash_table_destroy); + nm_clear_pointer (&priv->seen_bssids, g_hash_table_destroy); g_clear_object (&priv->agent_mgr); g_clear_object (&priv->connection); - g_clear_pointer (&priv->kf_db_timestamps, nm_key_file_db_unref); - g_clear_pointer (&priv->kf_db_seen_bssids, nm_key_file_db_unref); + nm_clear_pointer (&priv->kf_db_timestamps, nm_key_file_db_unref); + nm_clear_pointer (&priv->kf_db_seen_bssids, nm_key_file_db_unref); G_OBJECT_CLASS (nm_settings_connection_parent_class)->dispose (object); diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index d8da1aa356..c2521646f9 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -1338,7 +1338,7 @@ read_one_ip4_route (shvarFile *ifcfg, v = svGetValueStr (ifcfg, numbered_tag (tag, "OPTIONS", which), &value); if (v) { if (parse_route_line (v, AF_INET, *out_route, NULL, error) < 0) { - g_clear_pointer (out_route, nm_ip_route_unref); + nm_clear_pointer (out_route, nm_ip_route_unref); return FALSE; } } diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c index d19db0fda2..808df49fde 100644 --- a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c +++ b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c @@ -376,7 +376,7 @@ dispose (GObject *object) NMSIfupdownPlugin *plugin = NMS_IFUPDOWN_PLUGIN (object); NMSIfupdownPluginPrivate *priv = NMS_IFUPDOWN_PLUGIN_GET_PRIVATE (plugin); - g_clear_pointer (&priv->eni_ifaces, g_hash_table_destroy); + nm_clear_pointer (&priv->eni_ifaces, g_hash_table_destroy); G_OBJECT_CLASS (nms_ifupdown_plugin_parent_class)->dispose (object); } diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index d91d1ca3b1..9725b983dd 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -3174,8 +3174,8 @@ dispose (GObject *object) nm_assert (!priv->assoc_data); - g_clear_pointer (&priv->bss_idx, g_hash_table_destroy); - g_clear_pointer (&priv->peer_idx, g_hash_table_destroy); + nm_clear_pointer (&priv->bss_idx, g_hash_table_destroy); + nm_clear_pointer (&priv->peer_idx, g_hash_table_destroy); nm_clear_pointer (&priv->current_bss, nm_ref_string_unref); diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c index 932b444f27..35bf4afb3e 100644 --- a/src/vpn/nm-vpn-connection.c +++ b/src/vpn/nm-vpn-connection.c @@ -1636,7 +1636,7 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict) nm_ip4_config_add_route (config, &r, NULL); } - g_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); nm_ip4_config_add_dependent_routes (config, route_table, @@ -1883,7 +1883,7 @@ connect_success (NMVpnConnection *self) } priv->connect_timeout = g_timeout_add_seconds (timeout, connect_timeout_cb, self); - g_clear_pointer (&priv->connect_hash, g_variant_unref); + nm_clear_pointer (&priv->connect_hash, g_variant_unref); } static void @@ -1980,7 +1980,7 @@ really_activate (NMVpnConnection *self, const char *username) priv = NM_VPN_CONNECTION_GET_PRIVATE (self); g_return_if_fail (priv->vpn_state == STATE_NEED_AUTH); - g_clear_pointer (&priv->connect_hash, g_variant_unref); + nm_clear_pointer (&priv->connect_hash, g_variant_unref); priv->connect_hash = _hash_with_username (_get_applied_connection (self), username); g_variant_ref_sink (priv->connect_hash); @@ -2764,9 +2764,9 @@ dispose (GObject *object) nm_clear_g_source (&priv->start_timeout); - g_clear_pointer (&priv->connect_hash, g_variant_unref); + nm_clear_pointer (&priv->connect_hash, g_variant_unref); - g_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); nm_clear_g_source (&priv->connect_timeout); |