Use the new g_[s]list_free_full() instead of foreach() and free()

This commit is contained in:
Michael Natterer
2011-03-07 17:10:18 +01:00
parent 514a5548cd
commit fcfb7cf160
56 changed files with 97 additions and 187 deletions

View File

@ -151,9 +151,8 @@ script_fu_script_free (SFScript *script)
break;
case SF_OPTION:
g_slist_foreach (arg->default_value.sfa_option.list,
(GFunc) g_free, NULL);
g_slist_free (arg->default_value.sfa_option.list);
g_slist_free_full (arg->default_value.sfa_option.list,
(GDestroyNotify) g_free);
break;
case SF_ENUM: