diff options
author | Rui Matos <tiagomatos@gmail.com> | 2017-08-27 19:43:43 +0200 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2017-08-28 18:58:05 +0200 |
commit | 546752f79ebe261dba5c665d50051eabf325e6d2 (patch) | |
tree | 85a3d1e1239c349a82bf5d45d02b338eb7c90d51 | |
parent | b75fcaecfdb7c166c483646894bb2da936ef232a (diff) | |
download | gnome-control-center-546752f79ebe261dba5c665d50051eabf325e6d2.tar.gz |
info: Don't leak GCancellables
We were just plainly leaking them and there's really no need since
GCancellable instances can be re-used.
https://bugzilla.gnome.org/show_bug.cgi?id=786097
-rw-r--r-- | panels/info/cc-info-overview-panel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c index 7a5879c6b..0bc3d635e 100644 --- a/panels/info/cc-info-overview-panel.c +++ b/panels/info/cc-info-overview-panel.c @@ -505,7 +505,6 @@ query_done (GFile *file, GError *error = NULL; CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); - priv->cancellable = NULL; info = g_file_query_filesystem_info_finish (file, res, &error); if (info != NULL) { @@ -548,8 +547,6 @@ get_primary_disc_info_start (CcInfoOverviewPanel *self) file = g_file_new_for_path (g_unix_mount_get_mount_path (mount)); g_unix_mount_free (mount); - priv->cancellable = g_cancellable_new (); - g_file_query_filesystem_info_async (file, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, 0, @@ -602,6 +599,7 @@ get_primary_disc_info (CcInfoOverviewPanel *self) g_list_free (points); g_hash_table_destroy (hash); + priv->cancellable = g_cancellable_new (); get_primary_disc_info_start (self); } |