grim/guifications3

Parents c40d12eb29a6
Children 9a882cfb0ec1
missed a few free's. This is pretty ugly how I'm doing it right now, but it works.

refs #69
--- a/gflib/gflib/gf_preferences.c Wed Dec 09 20:23:28 2009 -0600
+++ b/gflib/gflib/gf_preferences.c Wed Dec 09 21:45:59 2009 -0600
@@ -183,6 +183,11 @@
g_value_init(&params[cur].value, G_TYPE_STRING);
g_value_take_string(&params[cur].value, value);
+
+ /* add the value to gc, this is ugly, but the best idea i have at
+ * the moment.
+ */
+ gc = g_list_prepend(gc, &params[cur].value);
}
g_type_class_unref(klass);
@@ -191,10 +196,17 @@
engine = g_object_newv(type, n_params, params);
/* cleanup time! */
- for(l = gc; l; l = l->next)
- g_free(l->data);
+ for(l = gc; l; l = l->next->next) {
+ /* we prepended everything onto the list, so the first item is a
+ * GValue, followed by a gchar *.
+ */
+ g_value_unset(l->data);
+ g_free(l->next->data);
+ }
g_list_free(gc);
+ g_free(params);
+
g_match_info_free(match_info);
/* we free the type_name down here so we can use it in the error messages