diff options
Diffstat (limited to 'cpufreq/src/cpufreq-selector')
-rw-r--r-- | cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c index 30e05532..990ea702 100644 --- a/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c +++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c @@ -78,18 +78,12 @@ cpufreq_selector_sysfs_finalize (GObject *object) CPUFreqSelectorSysfs *selector = CPUFREQ_SELECTOR_SYSFS (object); if (selector->priv->available_freqs) { - g_list_foreach (selector->priv->available_freqs, - (GFunc) g_free, - NULL); - g_list_free (selector->priv->available_freqs); + g_list_free_full (selector->priv->available_freqs, g_free); selector->priv->available_freqs = NULL; } - + if (selector->priv->available_govs) { - g_list_foreach (selector->priv->available_govs, - (GFunc) g_free, - NULL); - g_list_free (selector->priv->available_govs); + g_list_free_full (selector->priv->available_govs, g_free); selector->priv->available_govs = NULL; } |