The docs say both:

g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
g_list_free (list);