diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-12-23 22:25:31 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-12-23 22:25:31 +0100 |
commit | 9030ddb9d47663d16327a9e734ccfd0c74ba0bb7 (patch) | |
tree | 18dbd610214bb765fc6aeb711eba9e0b739ef136 | |
parent | bcf72c14ddedec281139fafce6cf955f7669a814 (diff) |
Free GError with g_error_free.
-rw-r--r-- | thumbnails.c | 2 | ||||
-rw-r--r-- | window_main.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/thumbnails.c b/thumbnails.c index 2fe763c..d669c99 100644 --- a/thumbnails.c +++ b/thumbnails.c @@ -82,7 +82,7 @@ GdkPixbuf *get_thumbnail(const gchar *filepath) { "tEXt::Software", "walls", NULL)) { g_warning("%s", error->message); - g_free(error); + g_error_free(error); } g_free(thumbname); diff --git a/window_main.c b/window_main.c index c62b15b..4038206 100644 --- a/window_main.c +++ b/window_main.c @@ -129,7 +129,7 @@ static void load_pixbuf(const gchar *filepath) { orig_pixbuf = gdk_pixbuf_new_from_file(filepath, &error); if(!orig_pixbuf) { g_warning("%s", error->message); - g_free(error); + g_error_free(error); return; } @@ -198,7 +198,7 @@ void on_foldtree_selection_changed(GtkTreeSelection *treeselection, gpointer use if(!thumb_thread) { g_warning("%s", error->message); - g_free(error); + g_error_free(error); } } } @@ -224,7 +224,7 @@ void on_thumbview_selection_changed(GtkIconView *iconview, gpointer user_data) { g_value_unset(&value); } - g_list_foreach(list, gtk_tree_path_free, NULL); + g_list_foreach(list, (GFunc)gtk_tree_path_free, NULL); g_list_free(list); } } @@ -255,7 +255,7 @@ void on_add_dir_action_activate(GtkAction *action, gpointer user_data) { add_thread = g_thread_create(add_dir_thread, strdup(directory), FALSE, &error); if(!add_thread) { g_warning("%s", error->message); - g_free(error); + g_error_free(error); } } gtk_widget_destroy(dialog); @@ -281,7 +281,7 @@ int gui_main(int argc, char **argv) { builder = gtk_builder_new(); if(!gtk_builder_add_from_string(builder, ui_string, -1, &error)) { g_warning("%s", error->message); - g_free(error); + g_error_free(error); return 1; } |