summaryrefslogtreecommitdiff
path: root/capplets/common
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-26 10:59:05 +0100
committerraveit65 <[email protected]>2020-12-04 22:00:43 +0100
commitff32e170961fa1999f802c844ead5d962dfec505 (patch)
tree0e4d8971ecdb745960bbbe676bce1f3ae6efde94 /capplets/common
parent6bebceb3dbbd9e9fc2b4661499785157cebbc8a4 (diff)
downloadmate-control-center-ff32e170961fa1999f802c844ead5d962dfec505.tar.bz2
mate-control-center-ff32e170961fa1999f802c844ead5d962dfec505.tar.xz
Use g_slist_free_full
Diffstat (limited to 'capplets/common')
-rw-r--r--capplets/common/file-transfer-dialog.c6
-rw-r--r--capplets/common/gtkrc-utils.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/capplets/common/file-transfer-dialog.c b/capplets/common/file-transfer-dialog.c
index 4536e071..3d1cf240 100644
--- a/capplets/common/file-transfer-dialog.c
+++ b/capplets/common/file-transfer-dialog.c
@@ -387,10 +387,8 @@ static void
file_transfer_job_destroy (FileTransferJob *job)
{
g_object_unref (job->dialog);
- g_slist_foreach (job->source_files, (GFunc) g_object_unref, NULL);
- g_slist_foreach (job->target_files, (GFunc) g_object_unref, NULL);
- g_slist_free (job->source_files);
- g_slist_free (job->target_files);
+ g_slist_free_full (job->source_files, g_object_unref);
+ g_slist_free_full (job->target_files, g_object_unref);
if (job->overwrite_dialog != NULL)
gtk_widget_destroy (GTK_WIDGET (job->overwrite_dialog));
g_free (job);
diff --git a/capplets/common/gtkrc-utils.c b/capplets/common/gtkrc-utils.c
index 27e01dae..286eb1be 100644
--- a/capplets/common/gtkrc-utils.c
+++ b/capplets/common/gtkrc-utils.c
@@ -169,8 +169,7 @@ void gtkrc_get_details(gchar* filename, GSList** engines, GSList** symbolic_colo
}
}
- g_slist_foreach (read_files, (GFunc) g_free, NULL);
- g_slist_free (read_files);
+ g_slist_free_full (read_files, g_free);
g_scanner_destroy (scanner);
}
@@ -235,8 +234,7 @@ gtkrc_get_color_scheme (const gchar *gtkrc_file)
}
}
- g_slist_foreach (read_files, (GFunc) g_free, NULL);
- g_slist_free (read_files);
+ g_slist_free_full (read_files, g_free);
g_scanner_destroy (scanner);
return result;